Referral Spam

How to stop /referral spam in Google Analytics

How to stop /referral spam in google analytics – a solution that works

One of the most common challenges many website owners face today is being targeted by so called Referral spam and its subtype known as Ghost spam. /referral belongs to this annoying category of virtual pests. Let us first explain the difference between classic referral spam and its newer version, ghost spam, so as to avoid confusion.

The former creates the false impression of a certain website having a given amount of traffic by the means of bots and crawlers. These visit your website multiple times, making you think you’ve had actual visitations. Classic referral spam can pretty much be dubbed outdated nowadays, though, because Google specialists have figured ways to combat it and it simply isn’t as effective anymore. The fact that its activity is kept very low has prompted hackers to come up with an improved version and that would be ghost spam. Ghost spam took things a step further and skipped the use of bots and crawlers altogether. Instead, it just alters your data, entering false one, which leads you to believe you’ve had so-and-so many visits from this-and-this website. Clever, isn’t it?

And the grand idea of it all is to tempt your curiosity and lure you into clicking back on this mysterious website that has been visiting yours so often, essentially generating traffic for it.

Harmful: yes or no?

Not quite. We should point out that /referral will not change your ranking or affect your actual traffic. It won’t really affect anything that truly matters, except for one thing and you will be the only one to ever be aware of it. It will alter your data in Google Analytics and depending on a few factors like the usual amount of traffic you experience, your website’s popularity – this could be felt very much. And the longer you tolerate the spammers behind /referral and take no action against them, the further your statistics will be messed up and nobody wants to deal with untrue information and false numbers. It’s misleading and can prevent you from making adequate decisions regarding your websites. For this reason we highly recommend NOT to delay and remove this issue as soon as you can.

Ways to protect yourself (as much as possible)

Hosting, hosting, hosting. It probably cannot be stressed enough, and many people have no clue just how important it is which hosting company they’re using. Any hosting company offers this thing called spam filters, and depending on the company – the quality of those filters can range from very poor to outstandingly great. This, in turn, can be determined by the company’s reputability and… price. It’s a simple truth, but if you want value for your money, you are going to have to pay up. Not that the difference today is outrageous – it isn’t, and you shouldn’t hesitate in choosing between a cheap hosting and a more expensive one. After all, this is an investment and it will pay off in time, when you discover the benefits of being less of a target for spammers.

Another point for you to keep in mind, if you want /referral and others like it to stay far away, is affiliate marketing campaigns. If you happen to be running those at this time, especially if they’re pretty massive and involve a large number of affiliates (other websites), that could be how /referral found its way to you. For this reason, again, it is important to have good spam blocking mechanisms (read: good hosting). That all being said though, at this point referral spammers are still one step ahead of the rest of us. This means that all of the above can reduce the risk of you coming into contact with them, but it is not a guarantee that you never will.

Naturally, stopping /referral from showing up in your Google Analytics as fast as possible should be your top priority, but you should use the proper tools for the job.

The Referral Exclusion List tool

You may have already heard about this one and perhaps you’ve even been told that it’s the already existing tool that will rid you of referral spam. Wrong. On the contrary, it might even make matters worse and that’s not in anyone’s interest. When you enter the name of the spammer bothering you, like /referral in this case, into this tool, Google Analytics will try to find it or trace back the visits. Which won’t work, because there were never any visits to begin with. From here on, these visits will be seen by Google Analytics as legit traffic and will be treated as such, which will leave you with an even bigger statistical mess.

How to stop /referral spam in Google Analytics

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

pic 1(1)

STEP 2: Next, click New Filter and add /referral 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 /referral spam in Google Analytics through .htaccess

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

RewriteCond %{HTTP_REFERER} /referral [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