Reclaim your Google Analytics by stopping Referrer Spam

One of the latest plagues on the internet has been an abundance of referrer spam.

A definition from Wikipedia so we all are clear on what referrer spam is:
“Referrer spam (also known as log spam or referrer bombing) is a kind of spamdexing (spamming aimed at search engines). The technique involves making repeated web site requests using a fake referer URL to the site the spammer wishes to advertise.”

Over the past few months, I have personally noticed a huge increase in odd referrers to my website.  Suspicious, unrelated URLs like:,, and (to just name a few).

My original thought was, “…why are these folks interested in *xyz* content?”  Well, turns out they aren’t.  What they are interested in is someone like me looking at the referral logs, getting curious about their own url, and typing it in to my browser navigation bar.  They aren’t even coming to the websites, but are instead just scanning through the different Google Analytics IDs in an incremental way (kind of the way we get robocalled on our phones: 555-555-0001, 555-555-0002, etc. but with UA-000001, UA-000002, etc).

The good news is, since they aren’t actually visiting the website we can filter out their traffic from analytics reports with filters.  My favourite method is to create a valid hostname filter within Google Analytics, where we specify all the domains we are using are Google Analytics ids on and ignore all the other “ghost domains”.  I like this method over other methods out there because it only uses one filter, and it has proved itself by working flawlessly on all the domains I manage over the past few months in which I’ve implemented it.

A nod over to the folks at Ohow who wrote a great guide on how to set this up for yourself – check it out:
OHow’s guide to stop referral spam