Dealing with Spam Comments.
Posted on 21. Apr, 2009 by Alex Denning in Other
Spam comments. I’m sure you’re familiar with them. According to Automattic, 83% of comments are spam. The question is, how do you deal with them? The obvious thing to do for wordpress users to do is install Akismet, but beyond that, there is very little most users will do. This post will run through the steps you can take to save yourself from being spammed.
Guilty until proven innocent
I’m quoting that headline from James Padolsey’s blog: as far as spam-stopping services (such as Aksimet) are concerned, you’re a spammer unless you can prove it otherwise. These days we just accept it, but filling out CAPTCHA forms is something that is increasinly becoming a requirement if you’re wishing to comment. Because of this, spam-bots are getting smarter, so to combat this, the CAPTCHA forms are now unreadable. I digress. That’s a rant for another day.
Protect yourself the .htaccess way
As this post shows, the .htaccess file can do your blog wonders, and it won’t only increase security, but it’ll also help you combat spam. You can block specific IPs using the following code:
Order allow, deny Deny from
But blocking specific IPs can get tiresome. So instead, head over to Perishable Press and use the ultimate .htaccess blacklist. It’s brilliant.
Keywords
Another simple thing you can do that is built into WordPress is send comments with certain keywords to the spam bin. Under the settings tab in the WordPress black end, click Discussion and you’ll find the option to block certain keywords.
To follow or not to follow?
In theory, NoFollow will deter spammers from commenting, but in reality, I haven’t found it does. What it does is stop search engines from seeing the link as a backlink, which in theory makes spammers think that there isn’t any point in leaving a comment. Well, unfortunately, it doesn’t quite work, so why not reward your commenters with a backlink and remove nofollow. It’ll encourage comments and give you a warm tingly feeling inside. Ok. It’ll encourage comments. Maybe not the second bit.
Captcha
Captcha can be a good thing, but it just annoys your readers. Whilst it may stop some spam, it won’t stop all of it, and, as I said, it is annoying!
And finally
This post was meant to be a bit longer, but it hasn’t turned out that way. Why? To protect yourself from comment spam, there are only two things you need to do: install Akismet and use the Perishable Press comment blacklist. it won’t stop all your spam, but it’ll catch it and stop it appearing on your site.
Additional reading
http://www.sixapart.com/pronet/comment_spam
http://googleblog.blogspot.com/2005/01/preventing-comment-spam.html
http://codex.wordpress.org/Combating_Comment_Spam
http://www.sitepoint.com/article/stop-comment-spam/
No related posts.

Enjoyed the post? We'll see you on Twitter or in your RSS reader!

Alex Denning is the founder of WPShout. A WordPress developer from London, Alex co-founded WPShift at the start of 2010 where he sells awesome WordPress themes.
You can find Alex on Twitter and at AlexDenning.com.
4 Responses to “Dealing with Spam Comments.”
Trackbacks/Pingbacks
[...] post I wrote a while ago, ‘Dealing with Spam Comments‘ was meant to cover this, but instead got a bit sidetracked, so I thought I’d cover in [...]




Jeff Starr
21. Apr, 2009
Another great post from Nometech!
Lately I have been experimenting with using only WordPress' built-in spam-moderation methods. Things like auto-moderation of comments containing links or certain phrases seems to work very well, almost to the point that Akismet is no longer needed. Almost!
Keep up the great work!
Jeet
23. Apr, 2009
Well IP address blocking doesn't really work. I have had really good success by including frequently used keywords in spam list. Akismet is great but I don't like having false positives. Twice so far they put advertiser's requests in spam.
AlexDenning
24. Apr, 2009
Cheers Jeff.
Means a lot to see rockstars such as yourself appreciating ma work!