What Is Referrer Spam and How Do You Stop It?


How Referrer Spam Hurts your Small Business

When it comes to analyzing your website traffic, there is nothing more frustrating than seeing page upon page of junk visits and spam referrals from bots that skew your research. These bots cause a problem known as referrer spam, where bots impersonate a real referral link to your website in the hopes that you will click on the link to visit their site as well. When you try to see where each of your visitors came from, you may notice a large influx of traffic from sites such as semalt.com or buttons-for-website.com. This traffic is not real, and it prevents you from seeing accurate, useful information about the audience that visits your website. Referrer spam can also harm your rankings in Google's search engine results.That is why it is so important to stop referrer spam.

There are two types of referrer spam

Ghost Spam: This type of bot uses a vulnerability in Google Analytics to make fake visits to your website.

Crawler Spam: This type browses your website, ignoring rules like robots.txt that are supposed to stop spiders from accessing specific pages.

The main difference between these two types of referrer spam is that ghost spam uses a fake hostname, such as hulfingtonpost.com, while crawler spam uses a valid hostname. Ghost spam never actually visits your site, but instead posts fake page views to Google's tracking service using a random series of tracking identification numbers. When your tracking number is randomly generated, a page view is generated on your site as a referral from the bot's source.

Why should you worry about referrer spam?

It would be one thing if referrer spam only crawled your website looking for easy hits back to its referring site. However, it's quite another thing when they cause your site to link to negative URLs that are being promoted by the spammers. You may be inadvertently creating links to shady websites that are penalized by Google, and this may cause Google to reevaluate your website too. Additionally, referrer spam can hurt your conversion rates, bounce rates, page views and other ranking signals that tell search engines about the relevance of your website.

How do you stop ghost referrer spam?

Unfortunately, because ghost spam never visits your website, you can't block it. However, you can filter them out of your data by creating an INCLUDE filter that only keeps traffic recorded from valid web hosts. This is the most effective way to prevent ghost spam from cluttering your analytics. While you can easily create a series of filters to block each individual invalid host, new ones pop up all the time, which makes it difficult to catch them all.

To implement this solution, you must be careful not to exclude valid traffic. Identify all valued hostnames that may use your website tracking identification number, including sites that you track as part of your website ecosystem, such as your own domains, your email marketing system, your ecommerce chopping cart, and so on. As this process can be rather tedious and complicated for the average internet user, you will probably want to have your webmaster handle this for you. If you feel confident creating a filter to block ghost spam yourself, this article at Analytics Edge goes into great detail on the steps necessary to do so.

How do you stop crawler referrer spam?

While Google will allow you to filter out referrer spam links so they don't clog up your data, a more efficient way to stop crawler referrer spam is to block it at its source. There are a few methods for doing this.

Edit your .htaccess file to prevent referrers from accessing your website

By adding some simple code to the .htaccess file, you can block spammy hosts before they can register as a referrer on the site.

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

Alternatively, you can choose to use a deflector that redirects spam referrer traffic back from whence it came by creating the text file deflector.map.

## deflector.map
##referer --> redirect target
https://semalt.com https://semalt.com
https://seoanalyses.com https://seoanalysis.com
https://buttons-for-website.com https://buttons-for-website.com

The code to be entered into the .htaccess file then looks like this:

RewriteMap deflector txt:/path/to/deflector.map
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}} =-
RewriteRule ^ %{HTTP_REFERER} [R,L]

If a coded solution is not right for your website, you can use a trick similar to the one used to block ghost referrer spam. Essentially, by creating a Custom Exclude for Campaign Source filter, you can exclude known offending domains.


As with all things related to the backend of your website, you will need to tread carefully, so be sure to contact your webmaster if you need assistance with referrer spam.

If your website is managed by CyberMark and your data is overrun with spam referrer links, please contact us today to help resolve these types of issues.

Get free ebook landing page

Author avatar
We use cookies to give you the best experience.