Referral Spam

Block Referral Spam in Google Analytics

In this article we shall inform you on the proper procedure on handling the referral spam in Google Analytics. Referral spam is a relatively new phenomenon that may target a variety of internet sites, apparently at random. 

What is referral spam? What does it do?

Now, onto the topic at hand. Chances are that you don’t know anything about the event that you are experiencing. The referral spam is known as a form of referral spam. Basically this is a type of black hat practice that spams website with fake visits in order to confuse the search engines in hopes of manipulating their search indexes. This has several benefits to the hackers, the most important of them being the increase in his/her site’s popularity, or more often an increase for the sites he promotes and redirects too. The method itself involves making repeated requests using a fake referrer URL to the website the spammer wishes to advertise. Websites that make their referral statistics public will then unintentionally link back to the spammer’s site. After that, the same links will eventually be indexed by the search engines when they access the logs of said site, improving the spammer’s position on the search rankings. Another way for the spammer’s to achieve the same result is to wait until the webmaster of a site checks the increase in traffic coming from Once he does that and clicks to open the site behind the spam he is redirected to the site that gets promoted, creating an actual link that boosts the ranking of said site.

Is dangerous? If so, how?

In general does not affect your website in any major way. It does not harm your ranking according to Google. However, this act is unwanted, because it messes up any Google Analytics statistics you might collect. A quick action is recommended – as soon as you notice this happening to you immediately install the necessary spam filters (more in the guide below). Some shady websites even use the referral spam as a service to boost their own rankings, which is why you should never open referral spam websites – you could be visiting a malicious website or worse. Also, remember that does not actually access your site. It just manipulates your Google Analytics by supplying it with false information. No traffic on your website is actually used and since the referrer does not actually visit the site all data related to it is bogus. This is why does not affect your own ranking on the search engines – this information has been officially confirmed by Google employees in the past.

Don’t use the referrer exclusion list

You are probably aware of the referred exclusion list and might be thinking of using it to battle We strongly advise against taking this action, because this not the reason why this list was created in the first place.

Should you decide to use it, then what will actually happen is that you will continue receiving visits from the same spammer, but this time you will not be able to tell which visits are real and which are fake. You are basically blinding Google Analytics from identifying the fake ones. The list itself was actually meant to be used by sites that rely on a shopping cart to prevent returning customers from being flagged as a new session or referral.

In addition to that, some people advise against using .htaccess rules, but we’ve noticed that a combined solution between a spam filter and will provde the best results. You’ll find the detailed instructions on how to block from showing in your google analytics right below.

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