Referral Spam

How to Block Google Analytics Spam

The referral spam in Google Analytics is a new breed of problem. This page is dedicated to eradicating it from your GA statistics.

We understand your frustration if you’ve found this page due to a recent encounter with referral spam. This is a somewhat common nuisance that thousands of website owners are faced with on a daily basis. And while it doesn’t really pose an actual threat to your site’s reputation, traffic count or ranking – it’s still not something you would want hanging around. We have dedicated this article to explaining all there is to know about and its kind. What’s more, we will also inform you about frequent mistakes people make and may try to mislead you into making as well, in an attempt to remove the spammers. And finally, at the end of the article we will provide you with a set of instructions within our removal guide that will really help you block the spammers and be rid of their influence on your stats.

What is and how harmful is it?

As we already pointed out, is a form of referral spam – one of many. More specifically, it belongs to a subtype better known as ghost spam. This is to distinguish it from an older version of referral spam, nowadays known as classic referral spam. Now, the chances of you running into the latter are rather slim. And here’s why: Classic referral spam relied on bots and crawlers to do its dirty work. The bots would be sent to a bunch of targeted websites and, thus, simulate real traffic. They would make multiple visits, which would show up in the statistics of those websites as having little to no session time. The goal was to prompt the curiosity of the website admins and owners and get them to click back on this other website that has been visiting them so frequently, without spending any time on the site at all. And in this way, traffic would be generated for the spamming website. As you can see, it’s a pretty clever tactic, but Google was able to eventually put a stop to it.

That is why ghost spam came to be. It’s a newer and improved version of referral spam that avoided using bots and crawlers altogether. Instead, the spammers only target your Google Analytics stats and alter those, so that they can show you visitations from the spamming website. Only difference is – these visits never happened. It’s an illusion. However, the website owners such as yourself have no way of knowing and tend to fall into the exact same trap as with classic referral spam. However, ghost spam like is way less harmful to you in the sense that only your stats are affected. They can’t touch your actual traffic count or otherwise affect you, because they don’t really do anything to your site. They don’t even go near it. But people have learned to spoil this and make a very small problem into a total disaster. Because why not, right?

We’re talking about the Referral Exclusion list. It’s a convenient tool in your Google Analytics, which despite the name is not designed to deal with ghost spammers. So, you might come across ‘great’ advice on the internet suggesting that you should enter into that list. Do not by any means listen to that kind of advice. You not only will this not help, this action will make matters a whole lot worse. You see, when you enter the spamming site in the exclusion list, GA needs to follow up on this information, so it goes after the visits you reported only to find nothing. So how can nothing be spam? It can’t, says GA and marks the visits as real traffic. Now, instead of having fake visits, you have real ones, for which you will also now also be required to pay.

That’s not to say that what is doing right now is good, either. It will eventually also grow into a bigger headache when the spamming ‘visits’ don’t stop and continue to further disrupt your stats. At some point, you will lose perspective of your actual audience and that’s not something you would want happening. So instead of letting the spamming carry on and instead of turning into a whole new level of evil, we suggest you refer to the removal guide provided below. If you happen to run into any difficulties and have questions – please let us know in the comment section.

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