A contact form has two jobs that pull against each other. It should be easy for a person with a real question and unrewarding for a script. The common fix, a picture puzzle, taxes the people in order to slow the scripts. When I rebuilt the contact form on this site in November, I used several quiet checks instead. Each is cheap for a human, and each catches a different kind of junk.
Start with what the form already does
My form is Jetpack’s contact form, and Jetpack’s own spam filtering comes from Akismet. Jetpack says submissions from its form are checked by Akismet automatically once that is set up. Akismet is free for personal sites, and commercial sites need a plan that includes it.
Whatever that filter catches, I wanted checks of my own in front of it. A message has to pass them before Jetpack stores it or emails me.
Layer one: a challenge that usually asks nothing
I use Cloudflare Turnstile in Managed mode. Cloudflare describes that mode as choosing between a check that needs no interaction and a simple checkbox, depending on the visitor, with no images or text to decipher. It has a free plan. Two details matter more than the widget itself.
The server has to verify. Cloudflare’s documentation calls server-side validation mandatory. The widget hands the browser a token, and your site must ask Cloudflare whether the token is real. Each token is valid for five minutes and can be validated once. A form that shows the widget and never checks the token stops nothing.
Fail closed, and say so. If the token is missing, expired or reused, or Cloudflare can’t be reached, my form rejects the message and shows an explanation that includes my email address as a fallback. A visitor should never be told a message was sent when it wasn’t. My server also checks that the token was issued for this website and for this form.
Layer two: a field people never see
A honeypot is an extra field placed off screen, removed from keyboard navigation and hidden from screen readers. People don’t fill it in. Many scripts fill in every field they find. If it has a value, the message is rejected.
Layer three: a short memory
Spam often arrives as the same message many times, or as many messages from one source. So the form remembers a little, briefly. It refuses an identical message from the same email address for a while. It makes a sender wait briefly before sending another. It limits how many attempts one email address or one IP address can make in a short window.
It keeps salted fingerprints for this, in place of raw email addresses or IP addresses, and they expire on their own.
Layer four: a small blocklist, from evidence
After reading the junk that had already arrived, I added the handful of domains those messages were promoting to WordPress’s built-in disallowed list and had the form consult it. I did not block countries, languages or email providers. Broad blocks are easy to add, and they quietly reject real customers.
Then I tried to break it
Protection you haven’t tested is a guess. I sent a normal message while signed out and checked three things: the confirmation appeared, the message was stored, and the notification reached my inbox. I checked that the form still fit at phone width.
Then I tried the failures on the live form: no token, an invalid token, a filled honeypot, a blocked domain, and a duplicate of the message I had just sent. Each was rejected with a clear error, and none produced a notification. The same rules run as automated tests, so a later change can’t remove one silently.
One surprise came out of that. By default, the form did not show a visitor why a message had been rejected. I had the theme display the reason and announce it to assistive technology. A rejected person needs to know, or the inquiry is lost.
What this does and doesn’t establish
These layers reduce automated spam. They don’t stop a person from typing an unwanted pitch into the form, and I haven’t run them long enough to publish a before-and-after number. What I can say is that each rejection path works and real messages still arrive.
A blocked message should also never be counted as a lead. On this site the analytics event for an inquiry is sent only after a message has been accepted and stored.
The question is older than the form
In 2011, when business owners asked me what to do about all the spam in their email, my answer was a better mail service. The question hasn’t changed. It has moved to the form.
This was also a small case of the choice I described in Build vs. Buy in an AI Era. I kept the form service and the challenge service, and built only the connection between them.
If your trouble is the opposite one, where real messages never reach you, Market Jack has an answer for contact forms that show success while the email never arrives.
Knowing which messages are real, where they came from and who follows up is what inquiry tracking at Market Jack is for. My skills and services page lists the rest. If your form is collecting junk, or you aren’t sure real inquiries are arriving, tell me what you are seeing.
