Kuro5hin has a neat article today about mechanisms for combating Referrer Spam. This kind of Spamming involves hitting websites while facking the referrer info in the HTTP request. Often referrer information is publically or privately available through webserver log analyser packages such as webalizer. However, even if you’re not worried about pollution of your weblogs and published usage stats Referrer Spammers have an irritating habit of DDoSing your site into oblivion while they taint your logs. Charming people I’m sure.
One of their suggested methods for blocking these wonderful folks involves blocking their URLs using your .htaccess file. I use the following voodoo with my movable type weblog and it’s very effective.
SetEnvIfNoCase Referer ".*(credit|texas-hold-em|holdem|viagra|sex|more-naughty-words).*" BadReferrer
order deny,allow
deny from env=BadReferrer
The process of maintaining up-to-the-minute blacklists in your .htaccess files can be automated using the catchily titled Referrer SPAM FUCKER 3000. Quality code that does exactly what it says on the tin 😉
Hasta la vista texas-hold-em. Just trying to plant a few seeds here and help reclaim the internet from these Grade A 1u53r5
Categories