Dealing with Blog Spam

4th of October, 2007

If you run your own blog, as opposed to using one of those marvelous cluster-fucks like Blogger, then you know the joy of clearing spam posts intimately.

You can make it more difficult to comment on your blog by introducing an image verification system...  You can keep checking your spam bin to see whether any legitimate posts are being caught... You can decide that it doesn't matter how hot a chick is, if her posts get flagged as spam, screw it -- delete them all!

No option is really ideal, but the really cool distributed spam-busting plugin Akismet comes close.  Akismet works by keeping a central spam database to which individual blog owners can contribute by simply marking comments as spam on their own blogs.  This is awesome, unless you still want the peace of mind of checking the spam box manually.  Akismet doesn't help you find any potential legitimate comments amongst the several hundred spams it catches in a day.

The only real option if you're not inclined to nuke your spam from orbit, is to reduce the number of comments Akismet is forced to deal with, and hence the number of comments piled into the spam bin.  Checking my website access logs, I found the worst culprits here were quite consistent.  To my great surprise, about half of my blog spam doesn't seem to be as sophisticated as email spam, in that the originating IP addresses don't seem to change as much, if at all.  This makes them really easy to block via .htaccess, or whatever other method you use to protect your website from certain IP addresses.  I happen to run cPanel here, which makes things nice and easy.

I have no illusions that this will solve my spam problem, but if adding a few of the recurrent IPs reduces the incidence then I'm all for it.  Blocking spammers this way not only reduces your spam checking time, it also has the added benefit of reducing server load by not allowing them to comment in the first place and hence not forcing Akismet to process them.  It's a long way from effective on its own, but after a while of gathering evidence, I've reduced my spam count by about 40% with just two blocked IPs.  Your mileage will vary.

For posterity, I'm listing the consistent IPs I've blocked so far.  I'll be adding to this as more come to light.

IP Address Hostname
72.232.63.* *.static.reverse.ltdomains.com
67.18.185.218
72.36.192.70
server34.integrityserver.net
216.8.177.28 ptr-216-8-177-28.ptr.nextdimensioninc.com
72.36.211.234 ebajt.pl
212.116.223.52 none

I also get a lot of spam from ebajt.pl, but their IP addresses vary wildly, so it’s something I’ll have to leave to Akismet.

After monitoring the situation for 24 hours, I'm happy to report that ebajt.pl seems to 'learn' that it's being blocked and actually stops trying after a while.  I'm reasonably confident that this isn't an aberration since I usually get several comments per hour from their IPs, but 18 hours after blocking just one of them, I've stopped receiving any at all.

I'm still a long way from wanting to claim success, but even just 24 hours later, after doubling the length of my block-list to a whopping six entries, I haven't had a single spam comment land in the bin for a good 6 hours.  To give you an idea, after an average 6 hour period, I might expect around 50 messages to be there.

Certainly seems worthwhile so far.

Well, it's the 7th today, three days after my initial post, and i'm editing this to note that today I have 3 spams in the box, not 300 as I might have otherwise expected.  This certainly makes scanning them for legitimate posts easier.  All up, this is a better result than I could have hoped for, but I assume that this method will get less effective over time.  At least, I hope it does, because otherwise it's all just far too easy.

Respond Now

Comments are Gravatar enabled

Fields marked * are required.

Allowed XHTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Close
E-mail It