Referral Spam

Block Referral Spam in Google Analytics

This guide contains useful information about referral spam. In the instructions below you will learn how to block it from your Google Analytics and prevent it in the future.

Have you recently noticed some unusual increase in the bounce rate and the web traffic to your website? The most probable reason for that could be a referral spam called, which usually causes some twisting in the Google Analytics statistics and troubles many website owners all around the web. Unfortunately, this is a common practice used by hackers and spammers, which try to promote their own sites by creating fake visits to targeted websites and relying on the users’ curiosity to get clicks back to their spam page. On this guide, we are going to discuss – one particular referral spam and if you stay with us until the end, you are going to learn more about this disturbing method of gaining web traffic, as well as some proven steps that may help you block it from your Google Analytics.

How dangerous is referral spam?

This is probably the first question that arises when you notice the annoying fake visits on your statistics. Indeed, having your important Analytics data messed up with unreliable numbers and percentage can create a totally wrong picture to the situation with your website and its positioning on the web. That’s why blocking the referral spam is vital for your own website development. can do no good to your statistics data and it actually uses a tricky method to get you intrigued and make you click on the spam website. It creates fake visits to your website, which come and leave immediately, causing Google Analytics to count them as traffic, where in fact there isn’t any. 

A few years ago, the traditional referral spam was using bots and crawls to do so, but fortunately, Google managed to restrict it as much as possible. Nowadays, unfortunately, the spammers have come up with the so-called Ghost spam, which doesn’t need bots or crawls to fake visits, but it directly changes your Google Analytics stats reports. You, as a website owner, may naturally want to click on that site, from where the visits come, just to check what is going on. This way the spammers behind it can receive more traffic to their own page and gain better rating in the Google search results, which is their primary goal. And even though may not pose any direct danger to your site or online security, the fact that it pollutes your real website statistics data can really affect the way you read and use your website information. To the present, Google is fighting against the Ghost spam, but it still is a thing that many website owners have to deal with.

How to deal with

As we already said above, fortunately, does not do real harm to your website rank and does not steal your traffic. However, polluting your statistics with fake data prevents you from knowing what the real situation with your website is. That’s why blocking it is a good idea if you want to save yourself from the fake data and keep a track on the real one, especially if your earnings depend on the development of your site. Fortunately, referral spam can be managed, and the removal guide below contains some very useful steps that will show you how to do that. But before you proceed to the instructions, let us give you a few tips on how to prevent such disturbing spam in the future.

Referral exclusion list is something that you probably use when it comes to dealing with unwanted spam. This tool is indeed effective, but it only helps to keep the classical referral spam away. When it comes to Ghost spam, it may have the exactly opposite effect and lead to even more fake data in the website statistics. is using fake visits that mess up with your analytics stats, and there is no real visitor to your site. When the exclusion tool goes to check where the visits come from, it will lose the trace of the spam, and this way simply mark it as legit and count it as web traffic, which in fact it is not. That’s why instead of using the Referral exclusion list, it is better to think about more reliable hosting provider. Usually, the reputed hosting providers have good spam filters that protect the hosted sites from Ghost spam like Of course, the better service may cost you a few more bucks, but it will at least keep you safe from such annoyance.

Block 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