How To Remove Comment Spam In WordPress

Posted By: Poketors - January 09, 2014
Comment spam has been one of the common problems with any blogging platforms. Being the most used blogging platform WordPress is also having the problem..

Comment spam is done by some website owners who want to boost their Google rankings by having lots of links pointing to their own websites. The result of this might be any of the following:
  1. Once Google finds content spam, they will often block the site it’s coming from because it messes up their ranking system.
  2. It consumes and wastes your valuable time and internet bandwidth to remove them.
  3. Commenting spams heavily is a situation in which the server tries a lot to post bad information or deliver notification emails to you for each comment which in turn increases you server load.Consider a situation where a blogger received over 1 thousand email notifications of the comments on a single post which needed approval. In this case that bloggers will be getting more and more gradually and ultimately crashing his mail server resulting website unavailability.
If each of the comments goes for approval then it would be a serious problem. WordPress is having multiple plugin but one of the mostly used and popular is Akismet plugin for WordPress.

How Akismet Plugin for WordPress Helps In Removing Comment Spams :

Akismet is a WordPress plugin which is there to help you filter out those spammers. It is very easy to get it installed into your WordPress system. 

Follow the below steps to install Akismet Plugin :

1. Download the plugin, and upload it to the blog directory on your server in the plugins subdirectory under wp-content. 
2. Now activate from the WordPress plugins menu. 
3. If you get any message which says that you need the Akismet API, go to the WordPress website and search for one.

There will be an instruction in Akismet, which says “forget that spam was ever a problem.” So you don’t have to do anything else at all. Eventually the spam will simply be bounced. You will not receive a notification, nor will you have to delete spams wasting time.

Did You Pass Math plugin for WordPress :

Among the various plugins for WordPress, one more popular plugin is there for eliminating spam is the “Did You Pass Math” plugin. It basically makes the user perform a simple math problem before submitting a comment. The advantage of using this plugin is that most humans can understand this and most spambots can’t. So it is obvious that a comment posted through this is a legitimate comment. Here you can show a notice of caution that comments will be deleted if the math answer submitted is wrong.

What if all plugins fail ?

If all the plugins fail to remove spammers then there is one option by denying them access to your comments area. It does not mean you have to disable your comments section. For this you need to set up a filter.

Blocking their IPs would not help this. Most of the spammers use random IPs, while blocking IPs may reduce for a short time. Spammers are also experiment hijacking other people’s IP addresses. But if you are looking for short duration solution, you can try it. The IP address is included in the information packet for the comment. It is as easy to detect like traceable phone number. Search for patterns in your IP numbers.

Working with .htaccess file :

Best way to prevent them by using the .htaccess file to block unwanted IPs from even seeing your blog. Fro example, below lines can be added to the file:

order allow,deny

deny from

deny from 456.456.456.*

deny from 789.789.*.*

allow from all

As we all know that IPs are four-part numbers, such as, and if you see a pattern with the first two sections being identical, you can block all IPs of that type by simply listing them as 192.168.*.*, as you see above. It screens out all these IP numbers. In this case all the blocked IPs will get a 403 error page. Now you can customize yours so that your contact details are listed in case you’re blocking out a legitimate user. Never use your regular email because a spammer can harvest that too. Instead, encode your email so that it’s not automatically readable.

Once you realize that your problems are addressed, you can remove the block from your .htaccess file. If it still doesn’t work, or if you don’t see an IP pattern, it’s likely that spambots are hijacking someone else’s machine to attack your site. In this case, do not use the IP block. In other case, if you don’t have an IP pattern of attack, this may not work. An IP follows almost the same pattern, with the last of the four sections referring to the specific computer it is attached to.

Google’s Nofollow Attribute

You can use the Google Nofollow attribute for links. This attribute is embedded automatically by modern versions of WordPress.

It does not remove links, instead it makes those links irrelevant to Google. As a result it doesn’t hurt your rank in Google, and it doesn't allow a spammer to send data to your site.

It is not a quick fix. But it is a way to make your website resistant to spammers in the future. In case your website is already a target, you’ll have to work with it slowly, incorporating all these fixes. else you can turn on the nofollow option in your WordPress system; this will reject any spambots. Better you should upgrade your WordPress version or use soem similar plugin which will work in this principle.

Copyright © 2010-2021 Poketors | The content of this website is copyrighted and may not be reproduced on other websites.| Email us at :