You can edit your .htaccess** to prevent spammers posting on your blog.
Most spammers uses bots that lack a referrer. The referrer is the page a person was reading when he/she clicked to leave a comment. Bots didn't click on a link, and therefore lack a proper referrer.
This code will look for the a referrer, and deny comments if the wp-comments-post.php file without directly coming from your blog.
Just change
yourblog.com with the URL of your site, using the following code:
Code:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
And that's it.
** Note that Apache (usually Linux) comes with .htaccess abilities, and not Windows IIS servers. If you're using Windows, then you'll need a third-party application that lets you use .htaccess.
- For Windows 2003 (IIS6) and Windows 2008 (IIS7), you can use Micronovae IIS Mod-Rewrite.
- Another option for IIS7 is Helicon Ape: