How to reduce the number of spam comments?

Posted by Prem Tiwari | Updated on

For my blog, I too run Akismet to catch any spam that is posted to my blog, but I also prevent spam from being posted in the first place using a few plugins:

1. Cookies For Comments requires that people leaving comments have cookies and CSS stylesheets enabled. A stylesheet is added to your site that when loaded sets a cookie. This cookie is then looked for when a comment is left. No cookie? The comment is rejected.

This is effective because most spam bots do not load stylesheets or accept cookies. Note this will not prevent spam left by humans (it’ll be Akismet’s job to catch that).

2. Disable Trackbacks does exactly what it says it does. When you receive spam pings (links from other blogs), most often those are in the form of the deprecated trackback instead of the better and more modern pingback. Trackbacks, when used normally, require the person sending the trackback to enter a special URL from your blog into their blog. Trackbacks are pretty much never used legitimately anymore, so you can safely disable them and avoid lots and lots of ping spam. Akismet will take care of any pingback spam (it happens, but not nearly as much).

With those two plugins installed along side Akismet, I only get a few spams and very rarely do any of them actually make it onto my blog.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers