You are here

Referrer spam

Topics: 
Bugs

Since a few months, my logfiles get filled with referrer spam : when you click a hyperlink on one web site, your browser passes to the next site the address of the page where you clicked the link. This is logged by the server hosting the next web site.

The referer information can be faked very easily. Some unscrupulous web site owners will arrange to have several computers access a particular web site with a referer that lists their own web site address. There are a number of ways to accomplish this (see below), but the result is that the web server logs of the targeted site will contain hundreds or possibly thousands of entries with the fake referer information. This is known as "referer spamming". Most referer spam infects blog comments, but in my case, only my logfiles are filled.

There are several solutions to this problem, mostly involving the RewriteCond directive of the Apache webserver, but I choose the solution from Kuroshin, where a BadReferrer is being created based on the spam URL.

Underscorebleach.net however, states that the .htaccess based solutions are part of an unwinnable race, as it takes hundreds of rules to keep up with the randomly selected spam URLs. We'll see if my .htaccess file can keep up...