Hi there, i have an Adsense website and it somehow gets traffic from adsense unfriendly sources. So i decided to use .htaccess file in my website directory to disallow these domains. These referers. So the people who visit my Adsense site from these domains will see only Forbidden message and no website.
How to block certain referrers?
Go to your webhosting FTP and in directory where is index.php or index.html add file .htaccess if it is not there already. the dot before filename is important to be present.
Edit htaccess file in Notepad or other editor and paste this:
banning single domain and all subpages:
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} banneddomain\.com [NC]
RewriteRule .* - [F]
banning multiple refering domains and their subpages:
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} banneddomain1\.com [NC,OR]
RewriteCond %{HTTP_REFERER} banneddomain2\.com
RewriteRule .* - [F]
Does it help? Any other ideas?