Is Referrer Spam Ruining Your Google Analytics?

Franck V 787297 Unsplash (1)


Have you ever looked at your Google Analytics and noticed some strange referral sites such as site4.floating-share-buttons.com that are referring traffic to you? Did you think it seemed odd that such a non-descript site was sending traffic to your site?


These entries are known as spam referrals, and are a nuisance to have to sift through when analyzing your Google Analytics data.

So what are they and how do they affect you?

First let’s provide some background:

A bot is a program that crawls the web and performs repetitive tasks with high degree of accuracy and speed.

Bots crawl the web indexing content as they go. Some are good bots such as Google, some are bad bots such as spam bots.

Taking a good bot example, the concept is that if someone places a link on their site to your site bots will index that link, and your website will receive an HTTP request from the bot and will be recorded in your server log. If your server log is publicly accessible i.e. it can be crawled and indexed by Google, then Google will treat the referrer value in your server log as a backlink thus influencing the search engine ranking of the website linking to you.

What is Referral Spam?

Referral spam is when bots are attempting to influence the number of backlinks to themselves by artificially promoting links to your site, which point back to them.

Spam bots crawl hundreds and thousands of websites every day and send out HTTP requests to websites with fake referrer header. They create and send fake referrer headers to avoid being detected as bots. The fake referrer header contains the website URL which spammer wants to promote and/or build back links.

Is it Damaging or Dangerous?

Not necessarily. There are two main factors to be concerned about.

Factor #1 – Corrupt analytics data

If you’re relying on Google Analytics data to inform you how people are interacting with your site, where the traffic is coming from your data will be distorted due to spam referrals. It’s not the end of the world, but can be annoying and distracting. It’s hard enough analyzing real human traffic on your site, never mind filtering out bot traffic.

Factor #2 – Second: server load and security

Let’s face it, these guys are up to no good and we’d rather not have anything to do with them! The bots can place unneccessary load on your server and have the potential to be a security threat because you might see them in yor Google Analytics and click on them wondering why they’ve referred traffic to you. If unprotected, you run the risk of downloading a virus or malware.

How To Stop Spam Bots

Block via .htaccess

Warning: .htaccess is a very powerful file that dictates how your server behaves. If you upload an .htaccess file with one character out of place, you will likely take down the whole site. Before you make any changes to the file, I would suggest making a backup. If you don’t feel comfortable making these edits, ask your web host or web developer to do so.

RewriteCond %{HTTP_REFERER} semalt.com [NC,OR]
RewriteCond %{HTTP_REFERER} buttons-for-website.com [NC,OR]
RewriteCond %{HTTP_REFERER} seoanalyses.com [NC]
RewriteRule .* - [F]

Here’s a block list that is maintained regularly for you to use in your own .htaccess files.

Analytics Filters

You can filter out any known spam referrers by setting up a filter in your google analytics.

You can create a filter for your sites in Google Analytics by navigating to the Admin and then clicking on All Filters. Click on the New Filter button and then create a Custom Exclude for Campaign Source. Enter the domains you want to exclude using Regex. The format should be domain.\ followed by a pipe (|) for each additional domain.




Now you can get back to analysing the real data in the treasure troves that is Google Analytics.

Download our free guide to understand why you are losing valuable sales from your slow website and our recommended action steps to speed up your site.

Is Your Slow Website Costing You Sales?

30-Day Money-Back Guarantee

We Know Trying A New Service Can Be Scary. That’s Why We Offer A 30-Day Money-Back Guarantee. If You’re Not Happy With Our Work We’ll Gladly Refund You Every Cent!

trusted by hundreds of small businesses