Rumblings from the keyboard of Pete Eveleigh,
a web designer and developer based in Gloucester, UK

Anti Form Spam

Posted: March 24th, 2009 | Author: Foamcow | Filed under: Web Design | Tags: , , , | Comments Off

I seem to have hit on a simple way to prevent or at least greatly reduce the amount of spam generated by having a mail form or a comment form on your website.

Sure you can use a CAPTCHA but there are inherent problems with them – and I find them a little annoying if I’m honest.

The method I have adopted is to create a field on the form with the label “Leave this blank”.

If the field is filled in (as it will be by a bot that just completes every field) then I tag the mail as spam.

So far I’ve had 100% success with no false positives.

It’s always going to trip up now and again but so far, so good. Simple and effective!

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Tumblr
  • StumbleUpon
  • FriendFeed
  • Technorati Favorites
  • Share/Bookmark