Thursday, February 3, 2005

Prevent spam referrers

I have been noticing that there have been spammers that have been trying to get higher rankings on search engines by sending "referrer spam" to my site. They are sending HTTP requests with referrers from the domains that that they are trying to increase the rankings of. (To me this seems pointless, because I don't display the referrers anyplace that search engines can see.)

I just saw an entry on this pLog bug report, that mentioned a potential solution to this. Put the rewrite rules in your configuration:

RewriteEngine On

RewriteCond %{HTTP_REFERER} ^http://.*(loans|poker|casino|psxtreme|strip|diet|pills|learnhowtoplay|freakycheats|viagra).* [NC]

RewriteRule \.*$ [R,L]

This will cause any requests that have any of those keywords in their referrers, to be redirected to one of the spamming addresses.

No comments:

Post a Comment

Mastering Home Network Security: A Step-by-Step Guide to Fortify Your DNS with Pi-Hole and Raspberry Pi Across Multiple VLANs

Recently, I delved into the realm of setting up secure DNS for our home network, aiming to encrypt DNS requests en route to the name server....