Severity scale:  

Remove referral spam (Tutorial) - Free Guide

removal by Linas Kiguolis - - | Type: Spam tools

What should you know about referral spam? referral spam was one of the first examples of Ghost Spam[1]. Many website owners and webmasters have seen this troublesome domain in Google Analytics[2]. It’s still one of the most popular and active types of spam that mess up with website’s statistics. This technique allows spammers to advertise promotional websites by repeatedly sending fake visits to Google Analytics. When spammer’s URL appears in the statistics, the owner is encouraged to visit it. However, visiting these promotional sites might end up pretty bad. You might be redirected to a phishing[3] or infected website. For this reason, you should learn to recognize the referral spam examples. The spam attack might be held in different forms and names. Though, the names of the spam URL address often has words -free, -floating, – social, -share, -traffic or -button. Nevertheless, the names of the address may differ, they still redirect to the main website. This simply designed site offers to add codes that are supposed to add social buttons and help to drive traffic to your website. Even though free methods to boost traffic may look like a great opportunity, using them is not recommended. The biggest danger of these scripts is that they may hide malicious code[4]. Once you add them to your site, you may install malware as well. Hence, if you already did it, delete this script immediately and check whether your website was infected or not. referral spam does not cause damage to your website, it’s ranking on Google or popularity, and does not expose it to any security issues (unless you add the previously mentioned code). This spam tool only causes chaos in the Analytics, and only the site owner or webmaster can see this issue. However, there’s no need to ignore the spam attack because sooner or later it might be hard to analyze it. It’s important to block referral spam immediately. Referral spam messes up with the statistical data, and it may become hard to understand users’ behavior, what is the best for your customers, clients or advertisers.

Illustration of referral spam referral spam distorts statistical data in Google Analytics.

Why was my Google Analytics attacked?

Usually, the main purpose of the referral spam is to boost traffic to the particular websites. Most of the time spammers attack website’s data to make webmaster to visit promoted website or look information about it on Google. What is more, this activity also helps these websites to rank higher in the Google Search results and acquire backlinks. However, in some cases, spammers attack Analytics to redirect webmaster to the affiliate websites and get commissions[5]. Even though this activity is not dangerous, you should not let spammers mess up with your statistics. Once you have noticed referral spam in the Analytics, follow the steps below and block this annoying activity.

How to block referral spam?

Real statistical data is important to each website owner. It helps to plan the content and achieve better results, increase sales, etc. There’s no doubt that referral spam distorts them. Fortunately, you can easily block referral spam and see real statistics again.

Method 1. Create a new filter in Google Analytics:

  1. In your Google Analytics account go to Admin section -> All Filters -> Add Filter.
  2. In the Filter Name value add
  3. Choose Custom Filter Type.
  4. Open Filter Field drop down menu and choose Campaign Source.
  5. In the Filter Pattern box, type
  6. Select Views to Apply Filter.
  7. Click Save.

Method 2. Block referral spam from your server

Questions about referral spam

First of all, access .htaccess file:

  1. Login to the CPanel account.
  2. Go to File Manager -> click the check-box Document Root for -> your website. Also, select Show Hidden Files and click Go.
  3. Once you find the .htaccess file, right-click on it and choose Code edit.
  4. Copy and paste this code and select Save Changes:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*sharebutton \.to/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*sharebutton \-for\-website\.to/ [NC,OR]
RewriteRule ^(.*)$ – [F,L]


do it now!
Reimage Happiness
Intego Happiness
Compatible with Microsoft Windows Supported versions Compatible with OS X Supported versions
What to do if failed?
If you failed to remove virus damage using Reimage Intego, submit a question to our support team and provide as much details as possible.
Reimage Intego has a free limited scanner. Reimage Intego offers more through scan when you purchase its full version. When free scanner detects issues, you can fix them using free manual repairs or you can decide to purchase the full version in order to fix them automatically.
Alternative Software
Different software has a different purpose. If you didn’t succeed in fixing corrupted files with Reimage, try running SpyHunter 5.
Alternative Software
Different software has a different purpose. If you didn’t succeed in fixing corrupted files with Intego, try running Combo Cleaner.

About the author

Linas Kiguolis
Linas Kiguolis - Expert in social media

If this free removal guide helped you and you are satisfied with our service, please consider making a donation to keep this service alive. Even a smallest amount will be appreciated.

Contact Linas Kiguolis
About the company Esolutions


  1. Red says:
    February 16th, 2017 at 7:22 am

    Thank you for the tips!

  2. Spam Hater says:
    February 16th, 2017 at 7:22 am

    These spammers are so annoying. I dont understand why they do this. Its ridiculous

Your opinion regarding referral spam