What is Referral Spam and how to Block Referral Spam Bot in Google Analytics Report


Before few week I got an issue from one of my client that he is getting 60% Russians traffic and also from one domain. They were worried about it. When I noticed then I was also worried about it that how is it possible. I start looking for the problem, why this happening? So at last I find the reason and solution for this issue.

These are only the spam bot and the main thing is that it is harmless referrer spam and has no effect on anything except messing up Google Analytics reports. Tweet this 

It corrupt your analytic report and all your marketing strategies analyses depends upon your market analyses. And if you haven’t correct data about your market research then how you can make a perfect strategy for your targeted market.

We never allow or ask these bots to visit our website so whenever they visited to our website they consume our resources like webserver. So it create overload on the server which leads to slow down your website.

Before proceeding ahead, we need to know what Referral spam bot is.

What is Referrer spam bot?

Before going ahead, you need to understand that what is referrer Spam or Referrer spam bot? It is basically known as referrer bombing in your analytics aimed to messing up your analytic report so you can notice that specific host.

Why they spam your Google Analytic Report?

Now the question arises that why they spam your analytic report. What is the main purpose to messing up your google analytics? Do they want to degrade or out rank your website? If not then, is it harmful for your website? Let me clear one thing that these are harmless referrer spam and has no effect on anything except messing up Google Analytics reports.
They spam you so you can notice them and visit on their website (Tweet this ) and there may be some chances that you can hire them for their services. Some people just use webspam to generate leads for your business. Like you can pay to spread web spam on the behalf of your company to generate leads.
Semalt is another web spammer. Actually it is an SEO product which helps you to analyses your website’s onpage and offpage such as Keyword implementation and link matrix etc.
All other spammer are also focusing to generate leads by giving you referrer spam in your analytic or they just want to gather information about the owner of the website so they can reach to you.

Types of Referrer Spam:

According to Analytics Edge, there are three types of Referrer Spam. You can check them in your google analytic report.

Ghost Referrer:

It is the very worst referral spam bot so it is named as Ghost Referral. Actually it never visited to your website but they post fake page views to your google analytic with the help of any software magic using a random google analytic tracking IDs.

For example / /

Creepy Crawler and Fake Referrals:

These are very notorious spam bot which crawl the web for the very questionable purpose. Sometime they use to spread virus on your computer. Spambot like Semalt ancourage you to visit on their site to get leads and you can also ask the semalt crawler to exclude your website from crawling but in the case of other spambot, when you visit on their website they spam your computer and there may be more chances to hack your details. So I would like to suggest you to don’t click immediately on the link. Just wait and google the link. Only a snippets is enough to know about the web link.
For example,,     

Well Behaved bots and spiders:

This kind of Bots and spiders can easily be excluded from your reports by checking the option in your Admin – View – Settings.

How to detect Referral Spam in your Google Analytic:

It is not a tough task to detect of identify referral spam in your Google analytic report. There are three way to detect referral spam.

  • By Checking Referral Hostname
  • By checking landing Page
  • By Checking Metric Numbers

Checking Referral Hostname

It is the very easy way to find the referral spam on your analytic. This type of spam use mostly Not Set or Fake Host name which make you easy to detect.
So to identify, follow these steps:

  1. Go to your Report tab and select the time range as bigger as much. Much bigger will be the better. 
  2. Now Select Audience – Technology – Network – Hostname
Checking Referral Hostname
Checking Referral Hostname

See the below given screenshot. See red covered Ghost covered spam have no any valid hostname. They are using fake hostnames.

By checking the Landing page:

Yes, you can detect a spam referrer from the landing page. Mostly the spam target homepage or a page that doesn’t exist in your website. So you can easily identify this spam bot.

By Checking Metric Number:

It is another best way to find referral spam attack in your analytic report. The spam bot usually leave a very high numbers or very low.
By Checking Metric Number
Image Credit:

In this image you can see spam bots are highlighted with red and there session time usually 0.00% or 100.00% and Bonus rate 100% and average time 00.00.00 or little bit up and down.

So by this you can easily find the spam in your google analytic report.

I am sure you will also love this article as well. : How to remove negative search results from Google

List of Spam Site:

Here I am going to share a list of spam sites so you can identify spam bot easily in your Google Analytic report. / referral
resellerclub scam
resellerclub scam

How to block Referral spam bot in your google analytic Report

As we discussed that there are major two type of referral spam that mess your google analytic report. So to stop them, you can use Google analytic filters. But you can only stop Ghost Referral Spam with these filter and on the other hand, Crawler referral spam can be stopped by .htaccess file. So let me explain how to block through .htaccess file?

Using .htaccess file for crawler spam

.htaccess is a file that control who can access your website and who can’t. So before editing it, please safe your side by taking a backup of it so if you make any mistake you can recover it from the backup. Here I am going to share a code to block crawler referral spam. You just need to copy and paste in your website’s .htaccess file.

# Block Russian Referrer Spam
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.* [NC]
RewriteRule ^(.*)$ – [F,L]

Keep in mind that through .htaccess file you can only block crawler referral spam bot like,, etc.

Using Google analytic Filter

So as I explained that .htaccess stop only crawler referrer spam bot to crawl your website. But it is not able to stop Ghost Referral spam to mess up your analytic report. To fix this issue you need to use two filter in your Google analytic.
  1. Valid Host Filter
  2. Campaign Source Filter

Valid Hostname Filter

This is the only one filter to block ghost referrer spam and it stop the spam before it hits you. As I explained above that all the ghost spammer uses a fake host name or not set so it is very easy to identify and block. The most important task in this, is to find the valid and invalid host name.

  • Valid Host Name: Valid hostname include all the places where your Google Analytic tracking ID (UA-XXXXXX-1) located like,,, etc. It may include services like your shopping cart, translator(
  • Invalid Host Name: Any another hostname that is not recognized from your domain name, is a invalid host name. It can be a well-known name like, etc.

Now the question is how to find out valid and invalid hostname list in your analytic. So to find the list, follow these simple steps.

Step1. Go to Reporting Tab in your Google analytic report and select a wide range of date in your GA calendar. To see the better result, select the wide range of date as much you can.
Step 2. Now Select Audience – Technology – Network – Hostname as shown in the above image.
Step 3. When you click on Hostname, you will see a table which contains a list of hostnames where from you get traffic to your website. Check out this image:
Valid Hostname Filter
Image Source:

In this image you can see valid and invalid hostname. Once you find them, copy the valid host name and make a list and create an REGEX Expression like this.||||

Note: Don’t leave any blank space in the expression and you can use backslash to escape .(Dot).

Once you finished it, you need to add it in an Include Hostname Filter so GA can only track hits from these hostnames.

To create a filter, you need to follow these steps. Learn how to? Follow the steps:

Step 1. Click on Admin in GA.
Step 2. Now Click on Filter available in the View section of your GA Admin panel.
Step 3. Click on New Filter. When select New Filter a form will be displayed to your screen. Fill this as shown in the image. 

  1. Firstly fill the Filter Name as I filled Valid Host Name and select filter type Custom.
  2. Make sure you choose Include from the radio buttons and now select Hostname from the dropdown menu
  3. Now copy the REGEX that you built with your valid hostname and paste it in the Filter Pattern field.
 create a filter
   4. I will recommend you to verify your filter by clicking on Verify this filter. When you try to verify your filter it shows before and after the referral spam data to you. See in the image :
verify your filter

    5. Finally Click on Save and you are done.

Every time you add a hostname or add your tracking id in any service like Paypal, youtube etc, you need to include it at the end of the REGEX.

Using Campaign Source for the filter

It is the most recommended formula by analytic experts to stop hitting your analytic data by the spam bots. It is very useful for the quick action on your analytic so spam can’t hit your data. By this way, you can exclude the creepy crawler to hit your data. Keep in mind that these filter work on Full referral not just on domain. So you need to use Valid host filter along with. Here is a list of some creepy crawler created by analyticsedge. You can use it in your analytic.

Specific Exclude Filters for other sources that I am currently using (2015-06-08):|||||||-musicas*-gratis|||ranksonic|medispainstitute|offers.bycontext|100dollars-seo

Additional, less frequent spam:|||||||||||||||||||наркомания.лечениенаркомании.com|алкоголизм.лечениенаркомании.com|||.*|


So now, I think, you are thinking how you can create this filter in your account. Let me tell you the way. Follow the steps

Step1: Create new filter as guided above in this post.

Step 2. Now Click on Filter available in the View section of your GA Admin panel.

Step 3. Click on New Filter. When select New Filter a form will be displayed to your screen. Fill this as shown in the image.

Using Campaign Source for the filter
Using Campaign Source for the filter
  1. Firstly fill the Filter Name as I filled Campaign Source Name and select filter type Custom. 
  2. Make sure you choose Exclude from the radio buttons and now select Campaign Source from the dropdown menu
  3. Now copy the Referral Spam Names in the Filter Pattern field.
  4. Now verify your filter and Save it.

Bottom Line

Hey guys, hope now you are able to block referral spam in your Google Analytics. Keep in mind that if you see any kind your spam statics in your analytic report. Dont get panic. Take it easy and follow the guide. These spam bot are totally harmless. They just messed your analytic report to get your attention.
I have put 100% efforts to make it more easy as I can. Now I am requesting you to add your views and tricks in the comment section. Its your responsibility.
And do you know, I love sharing. So keep sharing, I will also back to you 😛
Naveen Kumar
Naveen Kumar is the Founder of F5 The Refresh. He is an SEO Expert by Profession and A blogger by hobby, who writes on various topics like Online Earning, SEO, Blogging and a lot more. You can follow him on Social Media.

LG G5 Rumors, Specs, Features

Previous article

Top 7 Amazing WhatsApp Tricks That You Should Know

Next article

You may also like


Leave a reply

More in Marketing