I have tried several different ways to stop spammers from spamming my referral logs, one being the .htaccess file. It works but I had to constantly add domain names to it and I really don’t want to spend my free time doing that, especially since the spammers have so many different domains. While the php code I use on this blog deters the spammers from even trying to hit my referral logs, I can see where that can become a problem with load time if the list of IPs gets too long. The difference between the php code and the .htaccess file is that the php code searches for the domains IP number and if the number matches the number in the code, it then redirects the spam to the spammers domain while the .htaccess will only stop the individual domain names the spammers use, regardless of the IP, from accessing my logs. Most of the spammers have multiple domains on one or two IPs. What this all means is that one IP in the php code can stop many domains from getting into my referral logs while the .htaccess requires me to list each individual domain. There may be a way to do the same thing in the .htaccess file as the php code does but I haven’t found it yet.

What I did find was an interesting way to use the .htaccess to stop referral spam on Coldforged.org. Instead of using the entire domain name, the code uses keywords that are usually a part of the domain name or in many cases, a sub-domain. He even provides a nice tutorial and a full list of the keywords he uses in his war against referral spam. I can see where this would be beneficial and if my php code ever gets too long to be viable, I may try this out. In the mean time I will continue to look for other options just in case I ever need one.

No Comments »