Blocking referer spam

Sat, 26 July 2008

Referer spam is a technique that involves making repeated web site requests using a fake referer url that points to the site the spammer wishes to advertise. Sites that publicize their access logs, including referer statistics, will then end up linking to the spammer’s site, which will in turn be indexed by the search engines as they crawl the access logs.

This benefits the spammer because of the free link, and also gives the spammer’s site improved search engine placement due to link-counting algorithms that search engines use. [Wikipedia]

I have tried using several WordPress plugins but without much luck. However blocking the referer in the htaccess file has surely done the trick.

I have added the following to the .htacess file

SetEnvIfNoCase Via pinappleproxy spammer=yes
SetEnvIfNoCase Referer doobu.com spammer=yes
SetEnvIfNoCase Referer poker spammer=yes
SetEnvIfNoCase Referer casino spammer=yes
SetEnvIfNoCase Referer cazino spammer=yes
SetEnvIfNoCase Referer kasino spammer=yes
SetEnvIfNoCase Referer medici spammer=yes
SetEnvIfNoCase Referer medica spammer=yes
SetEnvIfNoCase Referer insur spammer=yes
SetEnvIfNoCase Referer roulet spammer=yes
SetEnvIfNoCase Referer virtuel spammer=yes
SetEnvIfNoCase Referer pharma spammer=yes
SetEnvIfNoCase Referer adult spammer=yes

Order allow,deny
allow from all
deny from env=spammer

… and the amount of referer spam has gone from several hundred hits per day to zero in three days. Fingers crossed.

Stumble it!

Related posts

Web hosting - UNLIMITED space and transfer - $ 6.95 per month

One Response to “Blocking referer spam”

  1. My blog is in its infant stages so this is not something I have come across but eventually hope to, if that makes any sense. If I do come across it then that means i have traffic and will then be able to implement this.

    One question i have is, you mentioned about not having luck using wordpress plugins, are you referring to the ahskimet one?

Leave a Reply