Referral Spam

Block Google Analytics Spam

Online spam comes in all shapes and sizes and it is always annoying and frustrating. In this next article that you’re about to read, we will be focusing on one particular spamming method called Referral spam. Recently, new instances of Referral Spam known as has been reported, which led us to writing the current article. Here, we will give our readers an in-depth explanation on how this particular type of spam works and what its actual goal is. You will also be provided with several simple but very important rules that will help you deal with and ensure that you don’t have to deal with any more Referral Spam in the future.


If this is the first time you’re encountered this spamming technique, we must explain to you how it actually works. Referral spam is specialized at targeting websites. What it does is it creates fake visits to those sites. The purpose of this is that once a visit is generated, the visitor’s URL will be displayed on your website’s statistics. Many admins keep a close eye of their site’s traffic and often tend to follow visitors’ addresses to their source. When you follow the URL address coming from, you’d be effectively generating an actual visit to the hacker’s site, thus increasing its Google Analytics rating. On a larger scale, this can substantially boost the online crook’s website rating. As for your own site, it won’t be actually be harmed by the spam and it’s rating will not be altered by the spam. However, all those fake visits will mess up your statistics and prevent you from figuring out what your actual traffic is. This can be quite an issue if you are looking to improve your site and attract more visitors based on your site’s stats.

Different types

Crawler Spam: This is the classic type of Referral Spam and it uses actual bots to go to your site and thus generate views. In 2014, Google managed to devise a way to detect and stop this form of spam and since then it has become quite rare, because it was no longer effective.

Ghost Spam: This is a more advanced version of the classic Referral Spam. Instead of bots that actually visit your website, it directly meddles with your website’s statistics making it appear as if it has been visited while in reality no visits were made. While your actual rating in Google Analytics is not changed, you’d still be unable to tell how much of the views are from actual users and how much are Ghost spam. So far, Google has not developed an effective solution for this type, though they are working on it. Similarly to most instances of Referral Spam nowadays, falls under the Ghost category. Below our article, you can find a removal guide, in which we show how you can manually stop the spam from messing with your website’s stats. However, make sure to read our last paragraph, in which we will give you several invaluable tips that will help you handle your current issue and also prevent it from occurring again.

Important tips

Remember and apply the following rules and guidelines to ensure that you no longer have to deal with unwanted spam going towards your website.

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!

Related posts

Block Lifehacĸ Google Analytics Spam

Edmend Stewart
4 years ago

How to block Referral Spam in Google Analytics

Edmend Stewart
4 years ago

Block Referral Spam in Google Analytics

Edmend Stewart
4 years ago
Exit mobile version