Anti-spam for WordPress

| February 9, 2011 | Comments (1)

Today, blog spam is a huge problem but fortunately anti-spam methods are available. If you are running a WordPress blog or any blog, you will get hit by comment spammers eventually. The more popular your blog is, the more spam you will get. With the increasing number of spams each day, I have decided it is time to stop the spammers.

anti spam Anti spam for WordPress

How did I do that?

1. Rename the wp-comments-post.php file

I renamed the wp-comments-post.php file. Every spammer knows that WordPress comments are handled by the wp-comments-post.php file. This file will be their spam target. By simply renaming this file I will kill off every spambot that targets the wp-comments-post.php file. It is simple but effective.

After renaming my wp-comments-post.php file, I edited my template files to point to the new file name. I am using the Threaded Comments Plugins so all I need to do is go to WordPress Settings page, open Threaded Comments options page and enter the name of the new file into the Custom Comments Target field and click Update Options.

Then I uploaded a new wp-comments-post.php (I leaved it blank) so spambots won’t encounter a 404 error page. This will save my server logs from filling up with 404 errors.

2. Use nofollow tag

The nofollow attribute is another method used to anti-spam. According to Google, “when Google sees the attribute rel="nofollow" on hyperlinks, those links won’t get any credit when we rank websites in our search results”. So I added rel=”nofollow” to all links in the comments section. (Under WordPress v1.5, the nofollow attribute is automatically added to all links in the comments section.)

3. Use anti-spam plugins

Akismet
Akismet is the most popular anti spam plugin for WordPress. In order to use Akismet, you have to register an account at WordPress.com and get the API key. When new comment come to your blog, Akismet will check the comment through the web service to determine if it is spam. Suspected comments will be marked as spam and users can go through them later.

Math Comment Spam Protection
This simple plugin will ask the commentators a math question before they post their comments. It doesn’t require Javascript or cookie to work.

Spam Karma
Analyzes comments for spam based on a karma system.

AVH First Defense Against Spam
This plugin has a different approach to check spam. When visitors come to your blog, this plugin will first check their IPs, to see whether these IPs exist in the database served by stopforumspam.com, the Project Honey Pot or a local blacklist. By this way, the spammer can be blocked before the content of your site is served.

Simple CAPTCHA
A CAPTCHA for your comment system to prevent unwanted spams. Prevent automated spams by bots and most important naughty peoples.

SI CAPTCHA Anti-Spam
Adds CAPTCHA anti-spam methods to WordPress on the comment form, registration form, login, or all. In order to post comments or register, users will have to type in the code shown on the image. This prevents spam from automated bots. Adds security. Works great with Akismet. Also is fully WP, WPMU, and BuddyPress compatible.

Defensio Anti-Spam
Defensio is a spam filtering web service that you can use to protect your blog or web application from comment spam. Using Defension with other anti spam plugins will cause problem. So, please deactivate them in order to use this plugin.

WP-Hashcash
WP hashcash prevents comment spam by force the commentators to additional compute a value from javascript and submit it along with the comment. Besides this, it also helps to prevent trackback spam by comparing the IP of the trackback’s url with the senders IP, and by looking in the trackback’s url for a link back to your post.

Bad Behavior
Prevents spambots from even accessing your site by analyzing their HTTP requests.

bcSpamBlock
bcSpamBlock is a light WordPress plugin to fight spam. Users with Javascript enabled will not see any difference while users with Javascript disabled will need to copy and paste a small string into a textbox. Basically the plugin will generates a random ID and then encrypt it. When the comment form is submitted, the plugin will re-encrypt the random ID and compare to make sure it matches the crypt value.

WP Spam Hitman
WP Spam Hitman is based on set of rules and concept of hitpoint. With right set of rules and hitpoint level you can eliminate most or even all of the spam on you blog.

WP-SpamFree
An extremely powerful anti-spam plugin for WordPress that eliminates comment spam, including trackback and pingback spam. There is an interesting feature called Enchanced Comment Blocklist, which able to blovk the comment if the comment contains blacklisted keywords.

Email Protect
Email Protect will automatically change email addresses in your blog to other alternatives such as image to prevent spam bots from harvesting them.

Now spammers and spambots will not be my problem!

Tags: , , , ,

Category: WordPress, WordPress tips

Comments are DO FOLLOW

Comments (1)

Trackback URL | Comments RSS Feed

  1. Glenna Goolsbee says:

    This actually answered my drawback, thank you!

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.