How to Get Rid of Spam Comments from Your WordPress Blog

Many WordPress blog owners often face a tough time in getting rid of spam messages that are posted as comments. By posting spam comments, spammers try to make your blog visitors to visit their own websites. Spammers can post spam comments manually or make use of ‘robots’ to post randomly. Such comments can degrade the quality of your website.

Thanks to the user-friendliness of WordPress blog, there are several things that you can do prevent spam messages. Here are the three steps that you can take to get rid of spam comments from your WordPress blog:

Stop comments for moderation
You can accept comments automatically from a trusted commenter. However, you can block all the comments from new comment posters for moderation. If comments are posted by a robot, it will be stopped automatically. If you find someone posting comments for getting link juice, you can mark his/her comment as spam and messages from that user won’t be bothering you again. If you trust a comment poster, he will post relevant comments and you can set your WordPress to automatically approve comments from him. If comments contain over 1 link, you can hold it up for moderation.

Modify .htaccess
The following code is very powerful in preventing access to a .htaccess file. It can greatly help in cutting down on unneeded comments. You can add the code under the root .htaccess.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

In the above code, you need to write the URL of your website instead of ‘’. It is effective in blocking all spam messages posted by spam bots. However, it is not that effective in blocking spam messages posted by humans.

Cookie File Plug-in
In order for a plug-in to function, it needs a stylesheet or an image of your original html-code in your site. When your site loads on a web browser, it will load your stylesheet or image and along with it, it will also place cookie. When a reader places a comment, the plug-in will look for the cookie file. If the file is found, the comment will show up. On the other hand, if the file is not present, the plug-in will consider that comment as spam.

The work of the plug-in is to check when the comment was posted. If the comment has been posted within 3 seconds of opening your site, it is most likely that comment is nothing but spam message. The settings page will allow you to set the desired time interval. The messages that are intercepted by the plug-in can be deleted immediately or you can store them up in a spam folder.

Akismet Plug-in
One of the most powerful and popular plug-ins from WordPress for thwarting spam comments is the Akismet plug-in. When your blog post receives a comment, it automatically will perform several tests to check whether the comment is good or spam. If the comment is found to be good, it will appear beneath your post. However, if it is negative, the comment will be sent to the trash folder. It does will in filtering spam comments by queuing them up which allows you to review them later to accept relevant comments. To use it, you need to register with them to get an API key.

  • Devid

    Amazing Post……I happy to read your this post.I am implement in my wordpress site.

© 2017 SEO Scorpio. All rights reserved. Site Admin · Entries RSS · Comments RSS