
The other day, I was checking out a friendâs website.
I was poking around in his Analytics, trying to come up with some actionable insights for him to work on.
I saw a number that was super exciting. His referral traffic was through the roof!
Referral traffic can be super valuable. I had plans for how he could turn his referral traffic into insane revenue.
Until I started digging deeper. The referral traffic was 85% spam!!
Sometimes, owning a website means riding an emotional roller coaster.
Youâll take a look at your Google Analytics (GA) and see that youâre getting lots of referral traffic, like my buddyâs website.
Thatâs exciting! Right?

Unfortunately, if you dig deeper, youâll probably find out that a lot of that referral traffic is nothing but spam.
This is exactly what was happening to my friendâs site.
Referral spam (or referrer spam) is a pain in the butt for site owners around the world.
It makes it look like you have more hits than you do and it can throw off your entire marketing strategy if youâre unaware of it.
Yes, itâs that bad!
If youâve been seeing some traffic from odd sites that you donât recognize, itâs most likely spam.
Donât worry. Youâre not the victim of some malicious hacker. In fact, it happens to almost every site on the web.
Thankfully, thereâs a fix.
Once you take the steps to eliminate the spam infecting your site, your analytics will reflect your actual traffic and youâll be able to count on the numbers.
Plus, youâll be better able to make informed marketing decisions.
Unfortunately, most marketers and site owners donât even know how to recognize spam.
Thatâs not anyoneâs fault! Some spammers are so crafty that fake visits will appear perfectly legitimate.
First, letâs talk about how to identify spam.
Then, Iâll show you exactly how to spam-proof your GA and prevent it from happening again.
Learn how I used Google Analytics to increase my traffic to 195,013 visitors a month.
What is Referral Spam?
Like I mentioned before, referral spam basically consists of fake website hits.
Here are some screenshots of GA users, pointing out their referral spam.
This website is receiving new sessions (and look at those bounce rates!) from some weird sites.

Are you beginning to see a pattern?

Yikes! This unfiltered view of my GA is displaying a bunch of spam visits.

Theyâre not even real website visits (but weâll get into that later on).
Sometimes, youâll be able to tell that the hits are spam. But, other times, the spam comes from seemingly reputable sites.
Letâs start by examining some referral spam in its natural habitat.
Log into GA and click on Acquisition > All Traffic > Referrals in the left hand sidebar.

Scroll down until you see this box:

Youâll probably see valid visits, but we want to weed out the spam.
Thankfully, most spam is easy to spot. Several of the ones we noticed above had a 100% bounce rate and a session duration of 0 minutes, 0 seconds.
That basically means that a hit came through to your GA, but no one actually visited your site.
To find these spam hits, click on the Bounce Rate column, so visits with the highest bounce rates are listed first.

These hits have all the marks of spam. 100% bounce rates, 1 page per session and a nonexistent duration time.
This is exactly the kind of spam that you want to target and eliminate. Hereâs how to do that.
Step 1: Clean Out Existing Spam
To remove spam from your existing GA reports, you can create a Custom Segment.
Go to Acquisition > All Traffic > Channels.

Click on the Secondary Dimension box and enter âSource / Medium.â

At the top of this page, click, âAdd Segment.â

Click +NEW SEGMENT.

Click âConditionsâ in the pane sidebar.

You should see this box:

In the first dropdown, click Behavior > Hostname.

In the second dropdown, select âmatches regex.â

In the third box, youâre going to copy and paste the string below, courtesy of Brian Clifton:
offer|free\-|share\-|mercedes|buy|cheap|googlsucks|benz|sl500|hulfington|buttons|
darodar|pistonheads|motor|money|blackhat|backlink|webrank|seo|phd|crawler|anonymous|\d{3}.*forum|porn|webmaster|flipboard|fl\.ru|mbca|ahrefs|game|\.io|^sex|^video
Hit the OR button. Youâll see another identical section pop up:

Make sure the dropdowns are also set to âHostnameâ and âmatches regex.â
This time, copy and paste this string:
dailyrank|100dollars-seo|anticrawler|sitevaluation|buttons-for-website|buttons-for-your-website|-musicas*-gratis|best-seo-offer|best-seo-solution|savetubevideo|ranksonic|offers.bycontext|7makemoneyonline|kambasoft|medispainstitute
Hit the OR button again, and copy and paste this string:
127.0.0.1|justprofit.xyz|nexus.search-helper.ru|rankings-analytics.com|videos-for-your-business|adviceforum.info|videoâproduction|success-seo|sharemyfile.ru|seo-platform|dbutton.net|wordpress-crew.net|rankscanner|doktoronline.no|o00.in
Hit the OR button one more time, and copy and paste this string:
top1-seo-service.com|fast-wordpress-start.com|rankings-analytics.com|uptimebot.net|^scripted.com|uptimechecker.com
Again, make sure all of these are set to âHostnameâ and âmatches regex.â
Now you can apply this filter to any time frame and any view. Pretty useful, right?
Next up, we have to prevent future spam. Hereâs how.
Step 2: How to Add Filters to Block Out Referral Spam
Lucky for us, GA has the handy capability to create filters that stop certain traffic sources from coming through.
In other words, once you add spam sites to your filters, youâll no longer see fake hits from those sites.
There are two things I should mention, before we get into this step.
First, youâre going to have to keep these filters updated. New spam sites are always showing up and you want to stay protected from those.
Iâd recommend looking for referral spam every month. If you see any new spam referrers, create a new filter to block them out.
Second, youâll want to create a copy of your current Analytics view. This is simply making a backup of everything you see before you make any changes.
To do that, navigate to the Admin tab. In the right-hand column, click on âView Settings.â

Next, click âCopy View.â

Give your new view a unique name so you can tell it apart from your original view.

Now, if anything goes wrong with your new view, you can switch back to the old one.
Now, weâre going to add specific filters based on spam sites that have already given you fake hits.
First, you need to find the spam domains. You can do this by following the process above to get to your GA page on referral traffic.
(Hint: Itâs Acquisition > All Traffic > Referrals. Donât forget to sort the results by bounce rate by clicking the box at the top of the Bounce Rate column.)
Gather all of the spam domains in a spreadsheet or text document.
Second, you need to block the spam domains. Once youâve compiled all of the spam domains (those with 100% bounce rate and a nonexistent session time), head to the Admin tab at the top of the screen.
Click on âAll Filtersâ in the left column.

Click â+ADD FILTER.â

Give your filter a name like âSpam Domain Filter.â Next, click âCustom.â

In the next drop down menu, make sure âExcludeâ is checked. Under âFilter Field,â click on the drop down and select âCampaign Source.â
Next, youâll enter the spam domains you want to block into the Filter Pattern box. But, thereâs a specific way you have to do this.
The pattern looks like this:
domain\.|domain\.
So, if you wanted to block two spam sites called SpamMe and FakeViews, youâd enter:
spamme\.|fakeviews\.

Each domain ends with a \. And every domain (except the first) has a | in front.
To add a third called FakeHits, youâd enter this:
spamme\.|fakeviews\.|fakehits\.

Itâs kind of complicated at first. But, after a couple of tries, youâll get used to it.
When youâre done, scroll down to the âApply Filter to Viewsâ and click âAll Web Site Data.” Finally, click âSave.â
You now have a filter that is blocking all the spam sites that were plaguing you!
But, there is so much more you can do. Here are even more techniques to help you curb the amount of spam getting through to your site.
Step 3: Block Common Spam Referrers
Youâve probably gotten fake traffic from some more well-known spam sites, but thereâs a good chance that other spam sites are out there waiting to pounce.
Youâre going to stop these infamous spam sites right in their tracks.
Youâll need a total of four filters to do this. It sounds like a lot, but I promise itâs easy! Thereâs a character limit for each series of blocked referrers, which is why you need so many.
For the first filter, navigate to Admin > All Filters > + ADD FILTER.
This screen should look familiar. Give your new filter a name like âCommon Spam Referrer Filter.â
Click âCustomâ and make sure âExcludeâ is checked. Once again, select âCampaign Sourceâ from the Filter Field drop down.
This process is identical to what you just did, but youâll also use the strings from earlier in this article that you used to clean up your current spam.
In the Filter Pattern box, copy and paste the string below, courtesy of Brian Clifton:
offer|free\-|share\-|mercedes|buy|cheap|googlsucks|benz|sl500|hulfington|buttons|
darodar|pistonheads|motor|money|blackhat|backlink|webrank|seo|phd|crawler|anonymous|\d{3}.*forum|porn|webmaster|flipboard|fl\.ru|mbca|ahrefs|game|\.io|^sex|^video
Then scroll down, click âAll Web Site Data,â and then hit âSave.â
For the second filter, the process is almost exactly the same. This time, youâre going to copy and paste this string into the Filter Pattern box:
dailyrank|100dollars-seo|anticrawler|sitevaluation|buttons-for-website|buttons-for-your-website|-musicas*-gratis|best-seo-offer|best-seo-solution|savetubevideo|ranksonic|offers.bycontext|7makemoneyonline|kambasoft|medispainstitute
For the third filter, copy and paste this string:
127.0.0.1|justprofit.xyz|nexus.search-helper.ru|rankings-analytics.com|videos-for-your-business|adviceforum.info|videoâproduction|success-seo|sharemyfile.ru|seo-platform|dbutton.net|wordpress-crew.net|rankscanner|doktoronline.no|o00.in
For the fourth filter, copy and paste this string:
top1-seo-service.com|fast-wordpress-start.com|rankings-analytics.com|uptimebot.net|^scripted.com|uptimechecker.com
Thatâs it for this section! Youâve now got four (or five) filters working to combat spam.
Step 4: Block Third Party Traffic
Thereâs one more thing that you can do in GA to reduce the amount of spam traffic that you get.
Most of the time, when you get a fake hit, that referrer never even visits your site! This means that these referrers never request your actual hostname (usually your domain name).
To see this in action, make sure youâre on the Reporting tab in GA and head to the left-hand sidebar. Navigate to Audience > Technology > Network.

Select the Hostname tab.

If you donât see your actual domain name (or a variation of it), then that traffic isnât even visiting your site.
By blocking third party traffic entirely, youâll ensure that the traffic you get actually visits your website.
To do this, you can create a Hostname filter.
Start by going to the Admin tab and navigating to All Filters > +ADD FILTER.
This filter will be almost exactly the same to the other filters we created in Step 3. There are two differences.
First, choose âIncludeâ instead of âExclude.â

Second, select Hostname in the Filter Field dropdown.

In the Filter Pattern box, enter your domain name. Select âAll Web Site Dataâ in the Apply Filter to Views section and click Save.
Now, youâve effectively blocked out all third party traffic.
You can go a step further and block out traffic by country, if youâre seeing a lot of repeat offenders from the same country.
Obviously, this can also be problematic, so think carefully before you choose this option.
Conclusion
Unfortunately, there is no ultimate solution to completely eliminate spam. Spammers have always found a way to do their dirty deed.
Google and other huge companies are working to fight spam better, but thereâs no perfect solution on the horizon (at least, not soon).
So, itâs safe to say that if you own a website, youâll be facing spam for a while.
Thatâs why itâs crucial to regularly clean out your analytics and make sure only the good stuffâs coming through.
If spam is inflating your analytics, everything else gets thrown off. You could waste time, money and energy on strategies that are ultimately useless.
All it takes is a few minutes to set up these filters and youâll successfully eliminate 99% of spam. And, if you spend a few more minutes every month updating your filters, youâll be even better off.
Trust meââit is absolutely worth your time to battle spam.
What are your favorite anti-spam tips and tricks?
