How to Block Referral Spam in Google Analytics

If you’ve recently noticed traces of on your Google Analytics statistics, then you are most probably facing a referral spam. Referral spam is a shady practice, used by spammers to promote a particular website. They use this practice with the idea to gain better ranking at the Google search results. The negative effect you may have noticed from having this spam is that it pollutes the valuable information from your analytics data, therefore it is a good idea to remove it. Do not leave this page, because here we will show you how to block and this way stop it from messing up with your website statistics. But before we proceed to the removal guide, let’s first tell you more about this type of spam and what you can expect from it.

How can referral spam mess up with your Google Analytics data?

In general, referral spam is not a threat and doesn’t aim to harm your website. There is no need to worry about your Google Search Results because it will not affect it either. However, if you keep spamming you, and don’t block it from accessing your account, it can ruin the Google Analytics data reports. For example, it will generate 100 % of bounce rate on your website, because every time connects to your website, it leaves the page immediately. This way you will not know what your real bounce rate is and have your website statistics tricked. The same thing can happen with other data collected in the Google Analytics reports.

Such referral spam tactics are generally discouraged by the search engine owners, however, there are still no (effective) global actions against this practice at this moment. Despite the Google actions on developing methods to fight the referral spam, websites that are targeted should take actions against it on their own. In this article, we aim to help you set your own spam filters manually and stop spamming your website.

Is referral spam  a waste of time and resources?

Yes, spam, in general, isn’t something you need. Aside from junking up your Google Analytics with false data, is a big waste of time. The pseudo traffic that is generated is created to make their URL show up in your website analytics so that you can click it and visit the site. It aims to catch your attention. This spam claims to promote work from home opportunities. They say you can earn an income online. Where this could more likely be a scam, the website also contains affiliate links for online jobs, leading to other websites.

What kind of websites is most often targeted by referral spam?

It is important to know that no website is completely safe from referral spam attacks. However, there are some websites, who are more vulnerable than others. There are a few weak spots you should consider. Where you host your website matters. In case, you host your site in a cheap hosting, then consider moving it to a reputable hosting company. They eventually provide better service and some updated barriers against easy spam invasion. Running large affiliate marketing is also a potential spam gap, which spammers may take advantage of. Therefore, having a proper spam blocking settings is a good option to keep the spam away.

You are surely not the only person who has been bugged by referral spam recently. While this is not an issue to panic for, it is still ruining your analytics data. You may find it very annoying and depending on your website size, the false analytics data it collects may have a very meaningful effect on your website overall statistical information. Our “How to remove” team has prepared a solution for you in the guide below. Do let us know how it helped you in the comments after that.


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