Blacklisted!

Not so long ago, I received a call from one of our clients. His blog, which he added to his site about a year ago, was getting lots of attention. Unfortunately, it was the wrong kind of attention: Spammers were hitting his site hard, posting upwards of 90 spam comments each and every day.

I had a few recommendations for him, all of which were fairly basic: Moderate your comments; require commenters to have a previously-approved comment; don’t allow comments on images (by not linking to image attachment pages); and use Akismet. Beyond that, I told him, I really didn’t have much else to suggest. Like junk snail mail and spam emails, comment spam is here with us to stay — and as site administrators, we pretty much just have to live with it.

Except we don’t have to live with it as much as we might think. One possible solution — which I admit I completely forgot about at the time — is a built-in feature of WordPress: The Comment Blacklist.

The comment blacklist sends any comments containing any of the words listed directly to the spam queue. It’s a handy tool, especially if, like our client, you are getting dozens of comments for pharmaceuticals or marital aids on your blog.

To use the comment blacklist:

  1. From the Dashboard, select Settings>Discussion.

    dashboard-selector

  2. This will open the Discussion Settings page. Navigate down to the Comments Blacklist.

    discussion-settings

  3. Type in the words you want to blacklist.

    comment-blacklist

A note about blacklist terms: BE CAREFUL what you put into the list. Any comment containing the words in the blacklist will be sent automatically to the spam queue without any notification to you. Because the blacklist also uses partial words, you might end up blocking something you actually want to post. To quote from the WordPress codex:

“Remember that partial words can match, so if there is any chance something here might match it would be better to put it in the moderation box. Blacklisting a word such as tramadol will automatically delete any comments containing tramadoltramadols, bigtramadol, etc. But, blacklisting a word such as ass will automatically delete comments containing assasses, assistancepassionateassumption, etc.”

Therefore, you may want to put some terms in the moderation queue rather than the spam queue.

Here’s the list my client came up with:

  • tramadol

  • xanax

  • ambien

  • valium

  • vicodin

  • diazepam

  • nike

  • asics

  • rayban

  • ban

  • vuitton

  • ejaculation

  • erection

  • webmaster

It’s a pretty decent list (or indecent, depending on how you look at it). I’d probably take “ban” out of there, simply because it will likely show up in other possible words that I don’t want to blacklist.

We recently started the same process with one of our other sites, and it works like a dream. The Gucci, xanax, and all the other pain-in-the-butt comments now go automatically into the spam queue and I never have to look at them.

Yes, comment spam is a pain, and will likely remain that way. However, a little time and effort on the front end can go a long way in reducing the amount of time you have to spend dealing with it.

NOTE: A hat tip to Henry Mowry of SMARTS Broadcast Systems for reminding me of the Comment Blacklist.

This entry was posted in WordPress and tagged , , . Bookmark the permalink.

Comments are closed.