Ban IP to Stop WordPress Comment Spam Forever
WordPress spam comments is a big problem, but how can we stop, ban , block spam comments before they hit our wordpress blogs. A simple plugin can ban IP addresses of spammers and significantly reduce spam comments on your blog.
WordPress Anti Spam Tools
WordPress Spam Blocking Plugins: Most wordpress blogs use an amazing anti-comment spam tool called Akismet, but it is smart at identifying spam comments and moving them to the Spam Comments folder (it has blocked over a million spam comments here and you can’t even think of turning Akismet off). But what if you have to manually fish out any valid comments among hundreds of spam comments?
WordPress Comment Moderation: If you navigate to the WordPress Admin > Settings > Discussion, you will find 2 options
1. Comment Moderation will hold a comment in the queue if it contains X (you decide, I keep it at 1) or more links. (A common characteristic of comment spam is a large number of hyperlinks.) So when a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the moderation queue. 2. Comment Blacklist – When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. You can read more about these WordPress spam combating options.
So you block IP addresses via the blacklist, it will move all such comments to the spam queue, but that still means work for bloggers to screen for valid comments (unless you prefer to click “Delete all Spam”, which will also delete any useful comments, and invite query from readers as to why you deleted their comments). Did you know many valid comments are often blocked by Akismet and affected commentators can request Akismet to despam your valid comments.
Of course you can edit your .htaccess file to block some IPs, but how many times can you keep doing that manually?
Ban Spam IP: Stop Comment Spam
Welcome to WP-Ban, a very powerful wordpress plugin which helps you easily ban users by IP, IP Range, host name and referrer url from visiting your WordPress’s blog and prevent spam from ever reaching your comments. It will display a custom ban message when the banned IP, IP range, host name or referrer url tries to visit your blog.
The Ban Stats can reveal valuable info about spam attempts -

Ever since I have enabled this plugin, my spam comments are nearly zero and I can now easily screen and approve any comment wrongly labelled as spam.
But there is a word of caution, do NOT block your own IP. Do NOT use wild cards to block a large number of IPs or domains carelessly or you could be blocking thousands of your own readers and search engine bots. If you simply block the IPs which occur too frequently in your spam comments, ban those IPs and see your spam reduce in minutes. Thanks to John Chow where I first saw it in action.













Regular readers and commentators hate captchas. We then tried a maths plugin, which would just not accept the right total. When you get thousands of spam comments, you need a more aggressive tool.
I find it very ironic that immediately after scanning the headline of this post I clicked on the newest article and received an abrupt You Are Banned message for no apparent reason.
Do you think that alienating a reader now and then is an acceptable downside to these spam protection measures?
Thats strange. Since you accessed the first page from a particular IP, then accessed the new page from the same IP, why should it ban you. As far as I can tell, I have not banned your IP on our site. I need to investigate further.
I’m afraid most of these folks are right, and not right. Bad Behavior was a master at cleaning up comment spammers before they got to your blog, but that soon had many problems and couldn’t keep up with all the tricks comment spammers do.
The best usage for the WordPress blacklist and Plugins like this is to specific deflect a troll or some individual you are having a problem with. Not for comment spam. Unfortunately, the web has some trolls so this is more common than you might realize.
But for comment spammers slamming your site, this isn’t a good idea. It’s a giant time waster as they switch IPs and play a lot of games automatically where you have to do it manually. It’s a lot of work to maintain.
There are some changes coming this year, there has to be, to make this flood of nasty on our blogs easier to handle, and seriously penalize the abusers. I’m so proud you are not using CAPTCHAs which absolutely do not work, but this technique has been tried repeatedly and found to be only temporary if anything.
The warning, however, not to block your own IP or use a wild card in the WordPress blacklist and moderation list is very serious. I’ve seen people make a sweeping decision to block all XXX IP addresses or any URL ending in .RU and causing themselves a lot of headaches from users. That’s a good tip.
Well said Lorelle. I think the worst thing to do is use wildcards and end up blocking your own IP.