How to block the Google Analytics /Referral

This page was created to help webmasters block the google analytics /referral and help you understand what it is.

In the event that you have been targeted by referral spam, don’t worry – we’ve got you covered. This article is dedicated to explaining the effects and the operation principles of referral spam as a whole and this particular case, as well. We will tell you everything you need to know about this nuisance, as well as about a common mistake people make in an effort to deal with the issue on their own. However, most importantly, we will show you how to effectively remove the spammers from your stats and prevent them from further messing with them. You will find a removal guide attached to this page, just below the article for that purpose.

What is referral spam and what does it do?

First of all, for the sake of not getting things confused, we should point out that belongs to a subtype of referral spam known as ghost spam. It shouldn’t be confused with the classic referral spam, though both forms share the same objective. The point of both types is to popularize a given website – the spammers’ website. Even the means of achieving this is the same, save for one small detail that makes all the difference. So, let’s explain from the beginning.

Classic referral spam first began targeting various website owners by sending bots and crawlers to their websites and initiating visits. There would usually be a number of visits large enough to attract the victim’s attention and make themselves noticed. However, these visits would have no session time at all and a nearly 100% bounce rate. This, too, was aimed at sparking the affected users’ curiosity. So, in effect, the goal would be to get that website owner to click back on this strange website that has been initiating numerous short visits. This would generate traffic for the spamming website and the initial aim will have been reached. Now, soon after this practice began terrorizing far too many websites, Google developed a way to combat the bots and the crawlers and eventually put a stop to it all.

But it couldn’t last too long, as the spammers still want to boost their ranking and make their website more popular. So, they found a way to work around Google’s antispam mechanisms, by avoiding using bots and crawlers altogether. Instead, spam like goes straight to your Google Analytics stats and manipulates the data in them. As a result of this activity, your stats will display false information, leading you to believe that your website has been visited by another website. And in effect it will all follow the same scenario as described above. You will most likely click back on the visiting (spamming) site and generate traffic for it. And keep in mind that these practices don’t only target you and, say, a handful of other people. They spread their reach to vast numbers of websites, somewhere in the hundreds of thousands at times. So imagine the amount of traffic they are actually capable of gaining.

As for fighting and its brethren, it’s not that hard, but if you do it wrong – you will suffer the consequences. You can find plenty of suggestions online, advising you to use the Referral Exclusion list so as to block the spam. We cannot stress this enough: this will not work. In fact, you will be making matters gruesomely worse. So much so, that you won’t even be able to recognize your stats afterwards and will end up paying for traffic your website has never seen. Allow us to illustrate. You enter into the Referral Exclusion list and expect things to get better from that point on. However, Google Analytics needs to verify the information you’ve given it and therefore follows back the visitations you reported. Seeing as there were never any real visits to begin with, GA won’t see anything wrong with the visits and will mark them as regular traffic. As a result, your stats will still be messed up and you will have to pay for non-existing views. In order to avoid further distorting your stats, we recommend you use the below guide intended specifically for that purpose. An in order to prevent cases like this from occurring in the future, we would advise you to upgrade to a better hosting service. Better hosting usually means better spam filters.

Block in Google Analytics

Instruction #1: Enter your Analytics account.
After that load Admin and then – All Filters.

Instruction #2: After that, hit New Filter.
Next, add in the Filter Name value.

Instruction #3. Choose the Custom Filter Type. 
Once you see the Filter Field, go with Campaign Source.
Next, when you see the Filter Pattern text box, enter Confirm by clicking  the Save button you will see at the bottom.

How to block referrer spam using your .htaccess file

If you are aware of a way to access your .htaccess file, you will just have to write the  code below in there:


RewriteCond %{HTTP_REFERER} [NC,OR]

RewriteCond %{HTTP_REFERER}

RewriteRule .* – [F]

In case you are not aware of a way to access it, follow these instructions:

Access your cPanel account,
the go to File Manager.
After that you should mark the check-box ‘Document Root for’.
Then go to your webpage.
Another important tip: choose ‘Show hidden Files’.
After that select Go. 
Look for the .htacess file.

Once you find it,  rightclick it.
From the options that appear, select Code Edit.
Enter the code above and Save Changes. 

Hopefully, we have been helpful! Tell us in the comment section. We will be glad to read what your opinion is!

One Reply to “How to block the Google Analytics /Referral”

  1. I am not sure the place you are getting your information, however good topic.

    I must spend a while studying more or working out more.
    Thanks for fantastic information I used to be searching for this information ffor my

Leave a Reply

Your email address will not be published. Required fields are marked *