Comment Spam, The Phantom Menace Slowing Your Website

Spammers are bad by Justin Levy

The speed of your website is critical. According to one report for every second that a page takes to load, wave goodbye to 7% of sales and who can afford that? Visa Europe estimating £450m will be spent on Cyber Monday alone.

There's all sorts of clever tech solutions: cloud-based servers, cacheing, content delivery networks to name but a few. Surely good old-fashioned comments don't represent a website glue trap?

Although the rise of Twitter, Facebook and Linkedin have created many ways for writers and publishers to connect with their audience, good old-fashioned comments still have their place providing a stronger direct link.

Most popular content management systems (CMS) and blogging tools, like Drupal or Wordpress have commenting built in. Unfortunately, it's also been a way for spammers to advertise their wares from erectile dysfunction drugs to knock-off designer goods.

Fortunately, those same blogging tools have also developed anti-spam tools like Akismet and Mollom that keep a beady eye on the bad guys, blocking or filtering those messages. Those CAPTCHAs (the annoying letters you squint to read) hold back an avalanche of nonsense from your favourite sites.

Comment spam is a thing of the past. Or so I thought. Then, one Friday night an alert popped up saying one of our web servers was down. Whilst hunting the problem, I discovered that it might still be a major problem for websites.

Dozens of automated scripts were targeting the website trying to post spam comments. The volume was so high it effectively brought the server to a crawl. At best it's annoying to have a slow site and wasted bandwidth, at worst it's equivalent to a DDOS attack, effectively taking a website down.

Each spam comment consumes processing time and bandwidth. Get enough of them hitting your site and they're directly hurting your traffic and conversion figures. The only way to effectively stop this menace is to block them using a firewall i.e. stop them reaching the website.

Fortunately, sites like Stop Forum Spam aggregate reports of forum and comment spammers, providing a way of checking which IP addresses are the worst behaved.

We put together a technical solution to try and reduce the load on our servers. Over the last week 1,774 IP addresses posted 16,149 spam comments. Or at least they tried.

Maybe it's time to ask your techies to check your site? Feel free to pilfer/adapt/amend the code we put together.

Pic (cc) Justin Levy on Flickr. Originally posted on toodlepip.