Stop /Referral Spam in Google Analytics

You are probably on this webpage because you’ve noticed an oddly increased amount of visitors on your webpage from some particular website. Should this be the case, then chances are you have been targeted by one of the growingly popular instances of referral spam – /Referral. Now, this phenomenon in genral has been around for some time now and has even sprouted a sub-version of itself, known as ghost spam. The difference between the two is as follows:

Classic referral spam uses the help of bots or crawlers to visit your website and create the impression of actual traffic. Google specialists have, by now, managed to keep up with this means of spamming and keep it down to a minimum. This, however, has birthed the newer, more elusive version of referral spam – ghost spam. Unlike its predecessor, it doesn’t use bots to meddle with your stats. It merely enters false data, leading you to believe that you’ve had a given amount of visits from a website. This is done to spark your interest and make you actually visit the site in question, because no doubt you’ll want to know who it is that’s been browsing your pages so often. Thus, they will have generated some traffic for themselves, which is precisely the point of it all.

Factors that make you an easier target for spammers

Affiliate marketing campaigns. And this should hardly come as a surprise, but with large affiliate marketing campaigns, which often times involve an entire network of other websites, the risk of getting entangled with spammers such as /Referral is pretty high. For this reason you should make sure some good spam blocking mechanisms to ensure you won’t be too easy of a target for spammers. We’re saying ‘too easy’, because at this point, unfortunately, spammers are still one step ahead of the rest of us and being completely and permanently immune to them is pretty much impossible.

And, whether or not you’ve thought about this before, but your hosting also has a role in all of this. Cheap hosting companies are usually cheap, because they offer matching service. And the service includes – you got it – spam filters. So, if this happens to be the case for you, we do recommend you change to a more reliable hosting. Sure, you’ll be paying more, but in the end it will be worth your money, because you’ll be investing to a large extent into your website’s security. Well-established hosting companies will more often than not offer you newer, better, up-to-date spam filter technologies than their cheaper counterparts.

Is /Referral harmful to you and your website?

No. Not in the sense that it causes any damage to your traffic, your ranking or anything else that is of substantial importance. It does however alter your data in Google Analytics and this alteration, depending on the popularity and usual traffic of your website, can be pretty tangible. And the longer you let this fly and take no action against /Referral – the further your stats will be messed with. This should matter to anyone who is genuinely concerned with the future of their website and wants to have an accurate idea of where the website is in terms of audience. Therefore, in order for this picture to correspond to reality, we urge users to block /Referral as soon as they can. In this guide we will walk you through the steps of getting rid of referral spammers, so hold on – we’re almost there.

The Referral Exclusion List and why you should NOT use it

Many are familiar with this tool and are misleadingly told that it is meant to help them combat referral spam. Well, it isn’t. Furthermore, if you end up using the Referral Exclusion List tool as a means of removing your spamming problem, you will be actually adding more problems on top of the existing one. Here’s what happens:

Once you enter the given referral into the tool, Google Analytics will try and find where the visits are coming from, which will result in nothing. From then on, GA will no longer recognize the referral spam and simply see it as regular traffic, which will leave you with absolutely no idea of which traffic is legit, and which is fake. For this reason and for the sake of not unleashing even more chaos on to your statistics, don’t use the Referral Exclusion List.

Remove /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