Why Is My Contact Form Getting Spam?

Your form is being filled by software that has never seen it. That is the good news, because software is easy to fool and humans are not.

Why Is My Contact Form Getting Spam? — Troiana insight cover

In short

Contact forms get spam because automated scripts crawl the web looking for any form and submit to it blindly, at volume. Most of it is stopped by four cheap, invisible measures: a honeypot field bots fill and humans cannot see, a timing check that rejects submissions completed in under a few seconds, server-side validation that refuses obvious junk, and rate limiting per address. Together these eliminate the large majority of automated spam without a CAPTCHA. What remains is a small amount of human-submitted spam, which is a filtering problem rather than a security one.

How the spam gets there

Almost all form spam is automated. Scripts crawl the web, detect anything that looks like a form, work out which fields are which from their names and labels, and submit prepared content: SEO offers, fake enquiries carrying links, credential-phishing attempts, or simply noise. The script has never rendered your page, never executed your JavaScript, and never seen your form. It posted directly to the address the form submits to.

This matters because it means most spam can be stopped by requiring something a browser does automatically and a blind script does not.

A smaller share is human: people paid a fraction of a cent per submission to fill forms by hand, usually to plant links or pitch services. They pass every automated check, because they are people. That share is small and the defence for it is different.

The four defences that stop most of it

1. A honeypot field. Add a field the form's HTML includes but a human never sees, hidden with CSS and excluded from the tab order, with a plausible name such as website or company. Scripts fill every field they find. A submission with the honeypot filled is a bot; drop it silently. This single measure stops a large share of unsophisticated spam and costs nothing. Its weakness is that more careful scripts now check for hidden fields, which is why it is one layer rather than the whole defence.

2. A timing check. Record when the form was rendered, in a signed token or a session, and reject submissions that arrive less than a few seconds later. Humans take at least ten seconds to fill a contact form; scripts submit in milliseconds. Also reject submissions with a token that is hours old or missing, which catches scripts posting directly to the endpoint without ever loading the page.

3. Server-side validation. Never trust the browser. Check on the server that the email is plausibly formed, that required fields are present, that the message is not empty, not entirely links, and not in an alphabet your customers do not use. Reject messages containing more than one or two URLs; legitimate enquiries almost never contain several. Keep these rules loose enough not to lose real customers; they are for obvious junk.

4. Rate limiting. No real visitor submits a contact form five times in a minute. Limit submissions per IP address, and per email address, to a small number per hour, and return a polite error above that. This is the layer that stops volume attacks when the others are bypassed, and it is the same discipline any public endpoint needs.

With all four in place, a typical small-business form goes from dozens of spam submissions a day to a handful a month. None of them is visible to a genuine visitor.

Why not just add a CAPTCHA?

Because CAPTCHAs cost you real enquiries. Every study of them finds a measurable share of visitors abandon at the puzzle, the share is highest on mobile and among older and disabled users, and the puzzles themselves are now solved by AI services cheaper than a human can solve them. A visible CAPTCHA is the least effective defence against sophisticated bots and the most effective defence against your own customers.

Invisible variants, such as reCAPTCHA v3 or Cloudflare Turnstile, are more defensible: they score the visitor in the background and only challenge suspicious ones. They add a third-party script, a privacy disclosure, and occasionally a false positive that blocks a real person with no recourse. Use one as a fifth layer if the four above are not enough, not as the first response.

Handling what gets through

The human-submitted remainder cannot be stopped at the form, because it is a person completing it correctly. Handle it downstream:

  • Route submissions to a shared inbox with filtering, not a personal address. Keyword rules catch most link-planting and "we noticed your site" pitches.
  • Log every submission with its IP, timestamp and the honeypot and timing results, so you can see patterns and tighten rules against a real sample rather than a guess.
  • Do not auto-reply with anything useful. An automatic reply confirms the address works and harvests your response for the next round.

A note on email deliverability

A form that sends mail from your server is itself a mail sender, and a compromised or badly configured one can get your domain onto blocklists. If your form emails are going to spam, or the form has been used to relay mail, that is a deliverability problem with its own fixes: send through an authenticated service, never let the form set the From address to whatever the visitor typed, and strip line breaks from anything that ends up in a mail header.

What we do on our own site

Our contact form uses a honeypot field named company that returns a fake success to anything that fills it, server-side email validation, and a limit of five submissions an hour per hashed IP address, with no CAPTCHA and no third-party script. That is two of the four layers plus rate limiting, and it has been enough for a low-traffic studio site; the timing check is the next layer we would add if the volume rose. If your form is still receiving significant spam after these steps, book a call and we will look at what is getting through.

Common questions

How do I stop spam on my contact form without a CAPTCHA?

Add a hidden honeypot field that bots fill and humans cannot see, reject submissions completed in under a few seconds, validate on the server and refuse messages with several links or empty content, and rate-limit submissions per address. Those four layers stop most automated spam invisibly. Add an invisible challenge such as Turnstile only if they prove insufficient.

Why does my contact form get spam even with reCAPTCHA?

Because CAPTCHA-solving services and AI now pass visible challenges cheaply, and human-operated spam passes them by definition. reCAPTCHA also only protects submissions that go through the browser; scripts posting directly to the form's endpoint bypass it unless the server verifies the token. Pair it with a honeypot, timing check, server validation and rate limiting.

Is a honeypot field enough to stop form spam?

It stops a large share of unsophisticated bots at zero cost, but more careful scripts detect hidden fields and skip them. Treat it as the first of several layers rather than the whole defence, alongside a timing check, server-side validation and rate limiting.

Does form spam hurt my website's SEO?

Not directly, as long as the submissions are not published anywhere. Spam becomes an SEO problem if the form feeds a public comment or listing, which lets the links go live, or if a compromised form is used to relay email and your domain lands on blocklists. Keep submissions private and the form cannot affect rankings.

Why do spammers target contact forms?

Because forms are easy to find and the cost of submitting to millions of them is near zero. Any response confirms a live address to sell or phish; any published submission plants a link; any form that emails the visitor's own input can be abused to relay mail. Even a tiny success rate pays at that volume.

Have something worth building right?