How to handle blog comment spam

Comment spam really annoys me and I could imagine this is a huge problem on many blogs. I have tried different solutions to fight the problem and I think I have a solution now that works pretty good. Before I tell you about my solution, I want to share what I have tried to do so far.

Using Aksimet

My first solution was to use Akismet. I hoped that their solution was pretty smart and could block most of the spam. After some evaluation I found out that they blocked too much, so even some legal comments got flagged as spam. To make matters worse they didn't catch all spam comments.

Making visual captcha

I dropped Aksimet and did a visual captcha, where every commenter had to pick the cat between 6 random pictures [5 of them were of birds and one of them of a cat]. Even visual captcha only solved some of the problem, seems like the spammers are humans...! It took them about 1 minute to post a comment, but they were pretty persistent and in some hours they could post ~100 comments.

Making it easy to delete comments in batches

In my old interface deleting multiple comments was a pain - it took some time and some clicks. I improved the interface so I could delete comments in batches:

Comment deletions in batches
This made it pretty easy to delete a lot of comments at once. It was still a pain to delete 100s of comments so I had to think of something else.

Doing my own filter

I found a link between spam comments that made it pretty easy to do a good filter:

  • A spammer duplicates a comment to multiple posts: Posting their comment to a lot of pages increases their chance of getting some users and improves their page rank
  • A comment spam has a lot of URLs and they are duplicated in multiple posts: They are very interested in getting link-backs to their own pages

So my solution was following:

  • Make sure it isn't possible to post the same content multiple times
  • Have a database of recently posted comment URLs, if URL X has been posted over 2 times in the past, then mark the comment as spam

This solution works really great and mostly a spammer only posts one spam comment before giving up. Success and victory over spammers [for now] :-)

amix.dk related · Skeletonz · Tips 30. Nov 2008
© Amir Salihefendic. Powered by Skeletonz.