Dealing with Spam Comments.

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/

Have you noticed WPShout loads super-fast? That's because the site is running on the super-amazing WPEngine hosting.

Fed up of shared hosts that don't work? Give them a try.

About the author

Hello, I'm Alex! WPShout is my collection of WordPress tutorials which I started 4 years ago, just before my 16th birthday. If you need someone to make you WordPress screencasts or documentation for your product or service, get in touch — I'll be able to help you out. You should also follow me on Twitter :)

4 Comments

  • Jeff Starr

    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!

  • 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.

  • Cheers Jeff.

    Means a lot to see rockstars such as yourself appreciating ma work!