Beating Blog Comment Spam

This post was written by marc on September 24, 2005
Posted Under: Technology

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?

Reader 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.

#1 
Written By Ian Eiloart on September 26th, 2005 @ 7:10 am

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

#2 
Written By Yurij on September 27th, 2005 @ 12:51 am

Add a Comment

You must be logged in to post a comment.

Previose Post: