« Bad Sportswriting | Main | Four Annoying Things about Sports »

Bad Behavior (Not Really!)

I manage a handful of blogs, doing a better job of keeping everything updated with some than with others.

One of the biggest PITA's that a site owner has to deal with nowadays is comment spam.

It's not unusual for a well-trafficked domain to amass hundreds of bogus emails daily. Irememberjfk.com ranks around 365,000 with Alexa. That translates to 700-800 daily visitors. For some reason, spambots prefer better ranked domains, in my experience.

Anyhow, it's a pain to blow away all of the garbage that accumulates in the spam bin. And if I simply ignore it and let it get automatically deleted, I may well also lose legitimate comments that were flagged by the visitor not getting the CAPTCHA right the first time.

But I am happy to say that that particular problem is now a non-issue for me. That's because I have discovered Bad Behavior.

Bad Behavior (or Bad Behaviour, to you Brits) is a PHP application that screens attempts to get to your comment-posting scripts. Here's a quote from the Bad Behavior site explaining its operation:

Bad Behavior complements other link spam solutions by acting as a gatekeeper, preventing spammers from ever delivering their junk, and in many cases, from ever reading your site in the first place. This keeps your site’s load down, makes your site logs cleaner, and can help prevent denial of service conditions caused by spammers.

Cool, huh? But there's more to the story than that.

Instead of merely looking at the content of potential spam, Bad Behavior analyzes the delivery method as well as the software the spammer is using. In this way, Bad Behavior can stop spam attacks even when nobody has ever seen the particular spam before.

Sweet.

It includes a plethora of domains in its blacklist section, but it also includes regular expressions designed to weed out attempts by new kids on the spambotting block.

Bad Behavior works on, or can be adapted to, virtually any PHP-based Web software package. Bad Behavior is available natively for WordPress, MediaWiki, Drupal, ExpressionEngine, and LifeType, and people have successfully made it work with Movable Type, phpBB, and many other packages.

This is a Movable Type blog. I have put Bad Behavior to work by unzipping the package and uploading to a folder called bad-behavior in the irememberjfk.com site root.

After that, it's a matter of posting this code (exact path disguised to protect the innocent):

<?php require_once("/path-to-my-site-root/bad-behavior/bad-behavior-generic.php"); ?>

to my individual archive template. I use .php as my default file format, so that the include works correctly. Then, rebuild the archives, and I am now protected!

I get an occasional casino or porn spam, but VERY occasional.

I also use it at my joomla-based zuptoday.com site. I found the native joomla 1.5 extension at http://trac.4theweb.nl/jprojects/wiki/plg_badbehaviour.

So bloggers who are sick of spam comments, give Bad Behavior a try!

TrackBack

TrackBack URL for this entry:
http://www.baldguyweb.com/mt/mt-tb.cgi/634

Comments (1)

Thanks for the pointer, Ron. Just about to kick off a Wordpress blog and it'll be good to bolt this in right from the start.

Post a comment


Get emailed notifications of new articles!
NOTE: I will not sell any email addresses I receive, and will not send any unsolicited emails, either. If you sign up for new article notifications, that is ALL you will receive, and you can cancel at any time. You have my word.
--Ron Enderland

Enter your email address:

About

This page contains a single entry from the blog posted on December 20, 2008 12:52 AM.

The previous post in this blog was Bad Sportswriting.

The next post in this blog is Four Annoying Things about Sports.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 4.261