SEO Mysteries: Ghost Spam

By Stephen Douvros

I’ve seen it a thousand times. You’ve seen it, too. Your website is getting visits from some interesting places, like what appears to be a former Soviet republic, or maybe Paris (France, not Texas), but why would that happen when you’re focusing all of your SEO efforts to optimize locally? What does this mean for your site? What can be done?

When you look in Google Analytics to investigate, you’ll usually notice a few things – these visits from another country might all come on one particular day and then stop. The visits all hit one page, typically the home page, but spend literally zero time on your site, and are gone without any trace besides the additional visits you see from strange URLs.


It’s almost as if your site has been visited by a ghost…

In a way, it has been. These “hits” aren’t from actual visits to your site. Your SEO company isn’t trying to do anything shady to pump your numbers. Your site isn’t showing up for someone searching réparation de plomberie in Paris. How is this possible?

Spammers use a technical feature of Google Analytics called the Measurement Protocol to send HTTP requests directly to Google Analytics servers. Normally, this is a tool developers use to “measure how users interact with their business from almost any environment.” (For a more technical guide on this, you can visit Google’s Developers site here.) Spammers exploit this to send “traffic” to random tracking IDs on the servers, and one of those happens to be for your site. While this isn’t the only type of spam that can show up in Google Analytics, it has become more common, at least since 2014.


Why would somebody spend the effort to do something like this?

The idea, like with spam emails or even spam phone calls, is to get the receiver to interact with it. When you check out the source of these international visits, they’ll typically be from a very strange URL, such as “” Out of curiosity, you might visit that address, and, at that point, you’ve done exactly what the spammer hoped you’d do! The spam site is probably harmless, but there’s also a solid chance that it’s not. The spammers haven’t just exploited a technical feature of Google Analytics, but they’ve also exploited the human propensity for curiosity.


What can be done about this phantom menace ghost spam?

You don’t need to get an old priest and his younger counterpart. It’s fairly easy to create a filter that should help keep these out of your Analytics results. Ten easy steps, that’s all it takes:

  1. Go to the Reports tab in Google Analytics
  2. Click on Audience in the left-hand panel
  3. Expand the Technology section, and select Network
  4. At the top of the report (between the graph and the table of metrics) click on Hostname
  5. You will see a list of hostnames, including the ones that the spammer uses. Make a list of all the valid hostnames you find, like, or subdomains like if you have a subdomain – you may only see one domain here, which is fine!
  6. You’ll need to format the domain as (no need for the https://)
  7. Go to the Admin panel of Analytics and click on the Filters tab, then click Add Filter
  8. Name the filter as you like, then click Custom
  9. Make sure you select “Include” then select “Hostname” on the filter field, and copy the domain or domains that you formatted earlier in the Filter Pattern box. It doesn’t hurt to click the “Verify this filter” link below (any non-zero percentage there should mean the filter is working)
  10. Save your filter, and apply it to all the views you want
  11. Bonus step: bask in the warm rays of your new less-spammy existence!

This should take care of all ghost spam using invalid hostnames, but if you add your tracking code to other services, you need to add those URLs to the filter. Most of this information came from a very awesome article from Moz, which you can view at, so feel free to go there for further reading.

Another thing to mention is that if you see this type of traffic, it doesn’t mean your site has been hacked or that Google is counting these hits against you. Google recognizes the nature of this traffic, so while it may skew metrics as far as visits to your site, it shouldn’t have any impact on your ranking.

Happy ghost spam busting!





About the Author | Stephen Douvros

Inquisitive. Tenacious. Husky. These are a few words that accurately describe Stephen Douvros, a senior SEO analyst at Townsquare Interactive. He attended the illustrious Winthrop University in Rock Hill, SC, earning a degree in political science. He has over five years of experience in the digital marketing field, and, one time, he ate an entire Pizza Hut Stuffed Crust Gold pizza by himself.

Need Some help?

We help you find your ideal customers, drive traffic to your website and keep business running smoothly. Fill out the form below to start a conversation with one of our digital marketing pros.