It happens that links to your site defends on sites that do not belong to you and which does not represent your content. May be spam sites, Adult sites or…simply sites from which You don't want to receive visitors.
To block visitors who come from these sites, you need to add a few lines in .htaccess.
# definiti variabila spam_ref
SetEnvIfNoCase Referer "^http://(www.)?site-refferer.com" spam_ref=1
SetEnvIfNoCase Referer "^http://(www.)?alt-site.com" spam_ref=1
SetEnvIfNoCase Referer "^cuvant-inclus-in-adresa-url" spam_ref=1
# blocheaza tot ce este setat in spam_ref
<FilesMatch "(.*)">
Order Allow,Deny
Allow from all
Deny from env=spam_ref
</FilesMatch>
“#"Added in front of a .htaccess line, cancels the respective line. Let's say it is an informative line.
SetEnvIfNoCase Referer "^cuvant-inclus-in-adresa-url" spam_ref=1
This line blocks all the sites containing in the URL, the word set by you for example:
SetEnvIfNoCase Referer "^adult" spam_ref=1
The above line will block all the websites that contain “adult” in URL. adult123.com, adult.ro, 210391adult.net.