Anyone who has ever installed a contact form on their website has likely had to deal with heaps of spam emails coming through. These fake emails can be super annoying, especially when they never seem to let up – or when all you want is a real legit lead to come through.
Unfortunately there is no surefire way to completely rid yourself of spam emails that come in through your website contact form. However, there are some things you can do to minimise the amount of spam that hits your inbox. Here’s a quick look at what you can do to prevent spam emails.
What Exactly Is Spam?
Spam emails are essentially junk emails. They are unsolicited messages that arrive in your inbox, whether it be from strangers trying to sell you something, companies sending you emails after you made a purchase on their website, or gibberish typed into your website contact form.
In this context, we’re talking about spam emails that come through via your own website’s contact form. Whether they’re submitted by bots that have been programmed to type nonsensical text into the form fields or outreach workers trying to promote their own business and link to their own site, either way they’re not the kinds of emails you want to be wasting any time reading or replying to.
How To Prevent Spam Emails
Form Validation
First, you should restrict the inputs that are allowed for each field in your contact form so that users can’t enter just anything. For example, rather than having free text fields for each input, make it so that the user has to enter a proper phone number for the phone field, must enter exactly 4 digits for the post code, or needs to input a valid email address for the email. You could also make it so that the user is required to fill in certain fields without leaving anything blank.
Then if they don’t fill in these fields properly and/or completely, configure the form to display an error message and prevent it from submitting until these errors are corrected.
CAPTCHA
Next, consider implementing a Captcha field at the bottom of your contact form. Captcha is useful for combatting bots because it’s very difficult for a bot to be able to type in a dynamic phrase.
That said, bots are gradually getting better at beating the Captcha field, so you might want try something a little different…
Google reCAPTCHA
Google has recently developed something called reCAPTCHA, which they claim is “easy on humans, hard on bots”. It’s an invisible CAPTCHA field that only displays if the user is deemed suspicious. Alternatively, you can opt to use the “I’m not a robot” checkbox and require all users to check it before submitting the form – which is easy for humans, but tricky for a bot to do.
Create a Spam Filter
If you’re still seeing a fair bit of spam emails coming through, consider creating a spam filter.
Depending on your email host, there are different ways to do this. You can either configure one via your cPanel, in Outlook, in Gmail, or likely wherever else you have your email account. Spam filters help to cast a wider net over potential spam emails you receive, letting fewer pass through to your inbox and sending the rest to a junk or spam email folder that you never have to look at.