How do I stop the spammers showing up in my stats


Over the past few months we have had many clients asking us how to stop the spammer's URL from showing up in their referrer stats and does this damage their Google ranking?
 

Many of the URLs that are listed as referrers in your stats are not there as true referral links, but from spammers. Their primary purpose is to get you to click their link as you would to check out who has linked to you.
 

awstats listing spammerWhy stop spammers in your referrer list:

By removing the links, it makes it easier to read the referrer stats. This will give you a true guage of your backlinks.
 

Actions:
  • You can simply ignore them as Google knows that you can't control who links to you. This will not damage your ranking.
  • Change the URL that they have linked to. Not something I would suggest as you will lose your ranking on the page and have to setup a 301 redirection to the new page.
  • If you really want to remove them from your stats - The easiest way is to block the URL or country using .htaccess. In this way you can set them to a forbidden page, stopping them from getting into your stats.
     

Example Code:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^(.*.ru) [OR] // stop all websites from russia
RewriteCond %{HTTP_REFERER} ^(a-domain-name.com) [OR] // stop a single domain name
RewriteCond %{HTTP_REFERER} (weight.*) // stop any referrer string (domain even with extra wording) with "weight" in it.
RewriteRule .* - [F] // forhidden page


If you would like help in blocking the spammers, feel free to contact us.


 

©2025 All rights reserved

Web Development & Hosting Company FatGalah