• Skip to content
  • Skip to primary sidebar

Laplacef

  • Home
  • About Me
  • Blog
    • WordPress
    • Search Engine Optimisation
    • Blogging
    • Page Speed
  • Free Updates
  • Contact
You are here: Home / Search Engine Optimisation / Referral Spam – Remove it from Google Analytics

Referral Spam – Remove it from Google Analytics

May 2, 2015 by Keyur 5 Comments

Many people have asked how we can get rid of referral spam in Google Analytics. We normally see this under Reporting > Acquisition > All Traffic > Referrals.

If you see source such as free-share-buttons, buttons-for-your-website, best-seo-offer, hulfington-post, etc and the bounce rate corresponding to this websites is 100%, then it is a referral spam.

This could provide inaccurate analytics and you could see that the traffic is increasing to your website but unfortunately it is not at all legit but bot hits.

Solution:

The solution is to add the following code in the .htaccess files:

Stop Referrer Spam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## STOP REFERRER SPAM ##
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?4webmasters\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?anticrawler\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?addons\.mozilla\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?bestwebsitesawards\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?best-seo-solution\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?blackhatworth\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?buttons-for-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?econom\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?darodar\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?hulfingtonpost\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?googlsucks\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?humanorightswatch\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?ilovevitaly\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?7makemoneyonline\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?o-o-6-o-o\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?priceg\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?social-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?smailik\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?simple-share-buttons\.com [NC]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?youporn-forum\.ga [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?buy-cheap-online\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?free-share-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?Get-Free-Traffic-Now\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?best-seo-offer\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?buttons-for-your-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?theguardlan\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?hulfingtonpost\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^([^.]+.)*?torture\.ml [NC,OR]
RewriteRule .* – [F]
## STOP REFERRER SPAM ##

The code consists of the URLs that I came across in my Google Analytics. If you discover some more URLs please share it in the comments below:

Reader Interactions

Comments

  1. Dawn says:
    May 2, 2015 at 10:54 pm

    Those dang bots are everywhere on the Internet it seems, but having those spam bots can throw your stats off.

    I run many of my sites behind Cloud Flare and it seems to me that the analytics for bots and visitors is much higher than in Google analytics. But the good news is, is that Cloud Flare prevents many of the spam bots from crawling. It also helps that the server I run these sites on also adds the htaccess code automatically if you install their version of optimize wordpress.

    However, for those sites that I do not have running behind Cloud Flare, I have taken your list and added them to the htaccess as a prevention measure. When I looked at Google analytics, there were only a couple spam bots there, but might as well keep them all out. So thanks for this bit of info Keyur.

    Reply
    • Keyur Amin says:
      May 3, 2015 at 10:06 am

      Thanks Dawn.

      I had no idea if the CDN were able to block those spam bots but that’s something I have learned today. If some of the bots or spam referring sites you come across in the future are not in the list, feel free to add it in your .htaccess file and also in the comment here so that I can keep this code updated.

      Cheers

      Reply
  2. Sandy says:
    May 4, 2015 at 4:55 pm

    Meddling around the codes is one area that I hv yet to get accustom and confident with, Keyur. Just wonder, why do they want to do this?? Referring to the bots activities. Cheers.

    Reply
    • Keyur Amin says:
      May 4, 2015 at 6:24 pm

      You may have heard of getting 1000000 hits for just $10. This is where this spammers use those autobots to send the hits through. And we unfortunately become their victims. They send the hits to the server IP which record the hits on our servers and because they are not real visitors it shows the bounce rates to be 100% which messes our analytics.

      Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Free Blog Updates

Your privacy is never compromised.

Most Loved Posts

How To Defer Parsing Javascript in WordPress

How To Make Your Website Load Faster?

24 Ways You Can Make Money Using Your Website

How To Add Custom Sidebars For Each Category In WordPress?

How to redirect 404 to homepage in wordpress?

Make Your Own WordPress Sidebars

How To Remove WordPress Version?

How To Enable GZip Compression in WordPress?

How To Remove Query Strings From Static Resources?

Curtain Raiser – 20 WordPress Training Videos

© Copyright 2014 - 2016 Laplacef. All Rights Reserved