How to Block Spammy Accept-Language in either Apache or Nginx

1

Stevie-Ray has create a neat Nginx Referral Spam configuration file to block out known referrer spam on Google Analytics. https://github.com/Stevie-Ray/referrer-spam-blocker

Sure it's a cat and mouse game, but it definitely does help.

Now it seems that the spammer are using the Accept-Language header to spam Google's overview page with things like:

Secret.ɢoogle.com You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!

And

o-o-8-o-o.com search shell is much better than google!

Is there a way, either in Nginx or Apache, that you could block out Accept-Language headers that do not match the Language Tag pattern defined by W3?

Moe

Posted 2016-12-22T00:21:20.520

Reputation: 389

What kind of problem is this creating? A lot of Google Analytics referral spam doesn't hit the web server, it hits GA directly. – Tim – 2016-12-22T21:24:55.467

That's true Tim, however we use Google Tag Manager so we don't expose the GA ID to web-crawlers. This won't completely remove Referral spam, but it does reduce it. – Moe – 2016-12-23T01:17:16.050

No answers