If you have an enquiry form on your website, you’re probably familiar with the junk enquiries that come through.

Typically they look like gibberish but sometimes are hawking SEO products or another spammy wares. In most cases the spam robots fill out all the fields on the form so it passes any form validation you have.

There are a few things you can do to curb the spam.. but one of the best ones I’ve left until last.

Captcha – Use a “captcha” code, which looks like a jumbled series of letters and numbers. These can be installed locally or run from a third party system like Google’s Recaptcha. They can be very effective but look fairly cumbersome on your form and may even deter visitors from using it. Sometimes the codes are confusing enough to be useless.

recaptcha
Google's reCAPTCHA

Custom Question – A similar but simpler method is to create a test question .. something simply like “What colour is the sky?” or a mathematical one like “What is 4 + 5?” This works very well and is less cumbersome than a captcha code. Unless the spam robot is specifically targeting you, it will work ok. It is easily bypassed otherwise.

The Honeypot Method – This is one we’ve just started using on production sites and so far, it works really well. The idea is simple :

1. Create a “dummy” field.. like “YOUR NAME” and write “required” next to it. 
2. Hide the field.. either will CSS display:none; or CSS position:absolute; margin-top: -9999px
3.  In your form processor script create a condition to check that the field is blank before sending the enquiry.

You see, a spam robot will fill the field out automatically, even though human viewers can’t see the field at all!

Knowing this, simply don’t send the email if you detect anything in this input field.

In php it may be as simple as –    if(!$_POST[“honeypotfield”]) { // mail commands here } 

Give it a try. If you’re not sure about losing some enquries you can always adjust the form process to relabel the spam as “[SPAM]” then create mail rules to handle.

If a spam robot is programmed to skip the field, it will bypass your form easily, so this method is not ideal for large websites.. but for 99% of businesses this will cut spam entirely.

Let us know if this helps your form spam issues!

You must be logged in to post a comment.