September 24, 2005

Beating Blog Comment Spam

This works for me. Here's the movable type example:

Location /mt/mtcomments.cgi
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^.*marc.perkel.com/.*
RewriteRule ^.*http://www.ctyme.com/comment-spam.html
/Location


And for Wordpress Blogs:

Location /blog/wp-comments-newpost.php
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^.*dvorak.org/.*
RewriteRule ^.* http://www.ctyme.com/comment-spam.html
/Location

The way it works is - if the referring link isn't local - you don't ge to leave a comment. Am I the first one who thought of this?

Posted by marc at September 24, 2005 10:04 PM
Comments

Actually, HTTP_REFERER is set by the client, so this can easily be spoofed. I guess you'll block those comment spammers that don't bother to spoof the referrer.

Posted by: Ian Eiloart at September 26, 2005 07:10 AM

Really great idea! I'll try to use it in my blog.

Posted by: Yurij at September 27, 2005 12:51 AM
Post a comment









Remember personal info?