Referral Spam

Block / Referral in Google Analytics

If you have come across, then you are probably well aware of how chaotic things can become when it comes to managing you website. is a form of referral spam in Google Analytics, something that has been targeting website owners all over the world for quite some time now. It’s even gone through its own little evolution, starting with what’s known as classic referral spam and moving on to the more advanced ghost spam, which modern technologies are struggling to compete with. In the case of classic referral spam, Google specialists were able to effectively block it, because of the way it functioned. The spammers would use bots and crawlers to visit your website, this creating fake traffic in the hopes of getting you to click back on this strange visitor and earn them a hit. So, nowadays that we’ve learned to combat the bots, spammers evolved to the more efficient ghost spam, which doesn’t need bots to accomplish its mission. It essentially just manipulates the data in your Google Analytics tool, so you can see visits from the spamming site, without actually having received any.

Now, while we do recommend the quick removal (see instructions below) of, it’s fair to mention that its presence will not harm your ranking or actual traffic count. It will do virtually nothing but simply change your statistics, which only you can see.  But before you move on to the removal guide, here’s some necessary basic info we think you should be armed with in order to better understand the problem you’re dealing with:

What’s the point of referral spam?

In cases like, the spammers have one goal only: to generate traffic for themselves. And we’ve got to hand it to them, they’ve come up with a pretty clever way to do that. They create these fake visits on literally thousands of other websites with the help of referral spam and then count on some fraction of the people checking the stats to be prompted to have a look at the visitors. This alone is enough to generate pretty decent traffic and give them a nice ranking boost, thus promoting the site.

The problems start with the fact that by creating this illusion in your stats, those stats will soon become very distorted. In time you will begin to see a picture of your audience and all the data revolving around their interaction with your website that will have little to do with reality. Plainly said, it’s going to be a mess. And the more time passes, the bigger that mess will become and you will truly be struggling to maintain your site. We are positive that this was never part of your plans, which is why we’ve created this article and the guide that follows.

The Referral Exclusion List

You have probably heard about this tool whether in this regard or another, and it’s a pretty handy tool at that. The only thing is that rumors have been spreading like wild fire that this is the answer to your referral spam problem. It’s not! We cannot stress enough what a terrible mistake you’d be making by employing the Referral Exclusion List to deal with It will cause you an even bigger headache than you have now and we’ll explain why that is.

When you enter the spammers into the list, the system will automatically attempt to trace back the visits. What happens when it tries to trace back something that never happened? It gets confused. And as a result of that not only will it not mark these visits as spam, it will actually count it towards real traffic. As you can probably guess, that steaming mess with your stats will get even steamier and getting out of it will prove to be a nightmare. So please, do not resort to the Referral Exclusion List as a means of blocking spam.

Spam Filters

Speaking of blocking spam, this is something you should turn to your hosting company for. Since they are the ones responsible for the security mechanisms of your website, you should perhaps get better acquainted with those. And in the event that you find them to be insufficient (which they probably are, since you’re on this page), perhaps you should consider upgrading to a better hosting company. It will be worth the investment considering your website’s safety is at stake.

Block Referral Spam

STEP 1: In your Analytics account go to Admin —> All Filters.

pic 1(1)

STEP 2: Next, click New Filter and add in the Filter Name value.

STEP 3. Select the Custom Filter Type.  In the Filter Field —> Campaign Source. In the Filter Pattern text box, add and click the Save button at the bottom of the webpage.

Pic 2(1)

 Blocking referrer spam through .htaccess

If you know how to access your .htaccess file, you just need to input the following code in there:

RewriteCond %{HTTP_REFERER} [NC,OR]
RewriteCond %{HTTP_REFERER}
RewriteRule .* - [F]

If you don’t know how to access it, do the following:

Login to your cPanel account —> File Manager —> click the check-box “Document Root for—> your website. A side note: click on “Show hidden Files” and then Go. Find the .htacess file, right click it and choose Code Edit. Input the code I gave you and Save Changes. 

Did we help you? A thank you in the comments goes a long way to warm our hearts!

Leave a Comment