Archive for October 3rd, 2006

Improve Your Wordpress Comment SPAM Protection

A client contacted me a few days ago and requested that I add a few additional SPAM impediments to his Wordpress blog. These improvements were based on a post over at Shoe Money that has some excellent pointers.

Based on my quick investigation, it seems that suggestions 5 and 1 offer the most promise and the least complication.

Suggestion #5 is to block No Referrer Requests. Depending on your server configuration, you may need to play with the suggested .htaccess rule. I changed it from the original:

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*shoemoney.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://whereyouwanttosendthem.com/$ [R=301,L]

The following rule is my modification, because the whereyouwanttosendthem.com url was not working correctly … simply appending to the end of the blog url instead of redirecting the page.

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*myblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://www.myblog.com [R=301,L]

Suggestion #1 is excellent and simple. Rename your wp-comments-post.php file to anything you choose. Change the links that refer to this file in your comments.php template file and away you go. If you’ve implemented suggestion #5, you’ll need to change your .htaccess rule to reflect the new wp-comments-post.php file.

This is an excellent post by Shoe Money and the whole thing is worth a read!

October 3rd, 2006


About Harvey Ramer

CSS Web design, e-commerce Web design, and internet marketing issues from the desk of Harvey A. Ramer at Design Delineations.

View Harvey Ramer's profile on LinkedIn

Reader/Customer Feedback

Harvey Recommends

Accolades

Design Notes: A CSS Web Designer’s Blog at Blogged

Calendar

October 2006
M T W T F S S
« Sep   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Posts by Month

Posts by Category