Comment spam
13th of March, 2006 (Last modified: 14th of March, 2006) WWW , Site specifics ,
Spam has never been a real problem on this site. I'm guessing it's mainly to do with it's popularity (or rather the lack of popularity), lately this has taken a change for the worse. Not that the site has increased in popularity, it's rather that I've written some posts that has issued trackback's and pingback's to some popular sites. This has created a steady flow of comment spam lately.
mysql> SELECT count(*) AS FROM `wp_comments` WHERE `comment_approved` = 'spam' ;
+———-+
| count(*)|
+———-+
| 519 |
+———-+
1 row in set (0.00 sec)
mysql>
What does this mean? Basically it means that I've gone from almost no comment spam to a lot, more than 400 a lot, in a matter of weeks. I get an email every time a comment is held back due for moderation and now that's not possible anymore due to the amounts of e-mails I receive.
As a result of this I have been forced to tighten things up a bit, improving the blacklisted words and blocking IP-addresses recorded by both Martin Bekkelund and myself. The different IP-addresses are added to my .htaccess-file and is supposed to deny access to all those who are listed there. However, as the list of denied IP-addresses grow I'm a bit concerned about the web server and what it has to chew through before handing the visitors the page. This would be an even bigger issue if the site had a huge amount of hits (which it doesn't).
For the average visitor this should not make any difference, unless you manage to include the word "viagra" or "cialis" in a comment. Comments that includes these words will be deleted -- no questions asked. I'm guessing that most people will manage to comment without those words, however there are only a handful comments at this point in time and I don't really expect that to increase anytime soon.
The only real problem with all this spam-fighting-business is that it can easily turn into a trade-off between usability or spam. I.e. the visitors are the ones who suffer as a result of the spam. I have done my very best trying to avoid that from happening, but it's difficult. However, as time goes by and I gain more experience with what works and what doesn't I'll be better armed to avoid spam without risking making the site inaccessible to my visitors.
Since I'm not the only webmaster out on the World Wide Web, the smart people have created plug-ins and external services that is supposed to make comment spam history. However, I'm a bit concerned about handing my comments to someone else. Also, having someone else clean my garbage is simply handing the problem to someone else, and no one is going to offer such a service in the long run for free.
Because of all this I have denied access to all those who have sent comment spam lately and I'm currently working with some other ideas as well. Should you, or anyone you know of, experience any problems with the site do please let me know and I'll fix it as soon as possible.

3 Responses to “Comment spam”
Good luck with the .htaccess file that I sent you. It should block a set of common spam IP’s.
1I only have 219 spam comments. But i have deleted a few as well as marking them as spam
2I’ll give you more detailed feedback when I have some more statistics to base a reply on. After a week with these improvements the result should be obvious in either directions. Stay tuned as we fight comment spam!
3