WordPress Plugins in Use – Cookies for Comments

In our last post we took a look at Akismet, the anti-spam plugin for WordPress, which is in use on our site. Another anti-spam comment plugin that compliments Akismet is Cookies for Comments.

This plugin will attempt to set a cookie when a page is viewed in your blog. After leaving a comment, the plugin checks for the existence of that cookie. If it’s missing, the comment will be marked as spam. Quite simple, but the majority of comment spam is automated and would not use cookies. This plugin helps catch the ones that sneak past Akismet.

Installation

  1. In the Plugins section of the dashboard, go to “Add New” and search for “Cookies for Comments“. Use the auto installer.
  2. Activate the plugin
  3. In the “Settings” link in the list of Plugins, you can set the system to either mark as spam or delete comments that do not contain the cookie. That’s as complicated as this one gets.  :)

Advanced Configuration

If you do not want these comments even reaching WordPress, there is sample .htaccess code you can put in place that will block spammers from even reaching the wp-comments.php script if the cookie is not present:

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
    RewriteRule ^wp-comments-post.php - [F,L]

Looking for a web host that understands ecommerce and business hosting?
Check us out today!

Leave a Reply