✓ I'm available for hire! Check out my open source work on Github or drop me an email

Douglas F Shearer

Posts Tagged with akismet

There are 2 matching posts.

Reducing Comment Spam - Akismet or CAPTCHA?

Back when I had my blog running on PHP, I had a lot of trouble with spam. At the time I installed Akismet, but it didn’t seem to be doing as good a job as I had hoped. I eventually stopped accepting comments completely.

Commenting was something that was on the ‘A’ list when it came to creating my new blogging app, it was something that I really needed to get feedback from those who read my blog. Without interaction, a website is pretty much a one-way affair.

CAPTCHA

I reintroduced comments in my new app, but this time using CAPTCHA (Those funny skewed words like the one to the left, that you have to type into a text box). It was fairly easy to setup once I had RMagick up and running with the validates_captcha plugin. It worked well, I received zero spam in the week or so I used it.

There is a massive downside to using CAPTCHA though, it provides a barrier in terms of usability to people wanting to leave comments. Commenting should be as easy as possible, so people feel inclined to do so. Having to copy some text from one place into another is a hassle, and is likely to put a lot of people off. I know it puts me off. Also, anyone running their browser with images switched off will be unable to see the CAPTCHA image, and thus unable to post comments.

Akismet

From a user’s perspective, Akismet is a far friendlier proposition. There is nothing for the user to do other than to submit their comment. All the spam analysis is not done on the host server, but by Akismet, who compare the comment against their database of other spam, and tell you whether or not it is spam.

It’s easy to implement in Wordpress and many other publishing apps. Installing in Rails is also easy, thanks to the turorial by Dieter Komendera and the Ruby Akismet class by David Czarnecki. I used a heavily modified version of the method in Dieter’s tutorial, and added methods to flag mistakes, using the methods provided in the Akismet API.

It’s very accurate, and I’ve yet to get a false-positive where it incorrectly marks a comment as spam. Even though this hasn’t happened, I still like to keep even the spam comments, but not display them, until I have had time to review them. During moderation, I can correct mistakes made by Akismet, and automatically notify them of their mistake. In this way new spam is always being added to their database.

This approach does mean a little extra work for the site owner, but surely for quality interaction with their readers they should be doing this anyway?

Feel free to test Akismet out in my comments, and tell me what you think of various spam detection methods. If you want to generate a positive spam result, then use the name ‘viagra-test-123’, works every time! Have fun.

 
 

Spam begone!

For the moment I have disabled automatic publishing of comments until I implement a spam filtering system. Some of my very popular posts such as my K750i review are attracting a lot of spam I would prefer not to have. It is annoying that a proprietary comments system can be leveraged by the spam monkeys, they obviously have too much time on their hands.

I am still accepting comments, but I will have to review them before they are published on the site.

Update – Comments are automatically posted again! Except if you’re a spam bot, as you’ll see…

I have now installed the Akismet spam filtering system on my blog. Is very easy to set up, and only took me a few minutes. It’s primarily a Wordpress tool, but there are various different implementations of it available for other blogging tools, as well as barebone PHP4 classes, PHP5 classes, and many other web scripting languages. Go take a look if you want this sort of functionality on your blog.

Update 2 – It seems word has got round all the spammers about my site! Now hat I have erradicated the comment spam, I am getting referer spam which fills my stats with false users and addresses for sites of questionable legality and ethics. Suffice to say I’ll be installing Bad Behaviour at the first opportunity I have!