To stop contact form spam, which comes from bots that work through millions of websites filling in every form they find, use several light layers. Start with free, invisible checks such as a hidden honeypot field and a time check, make sure the form cannot be used to send spam to other people, and add a challenge without puzzles, such as Cloudflare Turnstile, only when bots still get through. This article explains each layer and what it costs your visitors.
In short
To a bot, a contact form is a free way to deliver a message to a real person. Spammers use forms to advertise and to send phishing links. The OWASP Foundation, which catalogues web security threats, lists form spam among the automated threats every website faces. It is the same worldwide, and it has nothing to do with how popular your site is.
No single defence is enough. Some bots defeat challenges, and others rotate through thousands of addresses so that blocking one does nothing. The answer is several light layers.
Start with the checks your visitors never see.
| Layer | What it does | Detail |
|---|---|---|
| Honeypot field | An extra field hidden from people; many bots fill in every field they find, so any message with it completed is discarded | Costs visitors nothing. Label the field so screen readers skip it, and turn off browser autofill for it, or a genuine visitor's browser may fill it in |
| Time check | Rejects submissions made within a few seconds of the page loading | People take time to read a form and type; bots submit in a fraction of a second |
| Field rules | Checks the content on your server, not only in the browser | A name field does not need web links, a phone field needs digits, and a message that is mostly links is almost certainly spam |
| Close what you do not use | Switches off forms and comments you do not need | If you do not reply to comments, switch them off. Every open form is an invitation |
For WordPress comments you do keep, the free plugin Antispam Bee works without a third-party service, though its own documentation says it does not protect form plugins.
Our help article on stopping comment and form spam in WordPress shows how to set these up.
Some spam is not aimed at you. A badly written contact form can be tricked into sending mail to anyone. If the form puts what a visitor typed into the From, Reply-To, Cc or Bcc line of the email without stripping out line breaks, a bot can add extra recipients and turn your website into a spam relay. Security researchers call this email header injection.
Reputable form plugins guard against it; home-made forms often do not. If your site uses a form someone wrote years ago, have a developer check it, or replace it with a maintained plugin.
Confirmation emails can be abused too. Forms that send a confirmation email to whatever address is typed in can be used to send unwanted mail to strangers. Protect registration and sign-up forms as carefully as the contact form.
Use a challenge without puzzles. The old answer was a CAPTCHA: distorted letters or "click every traffic light". They frustrate everyone, bots increasingly solve them, and a W3C note on the subject explains how they shut out blind, partially sighted, deaf and dyslexic visitors. Newer challenges ask the visitor's browser to do the work instead.
| Option | How it works | Worth knowing |
|---|---|---|
| CAPTCHA | Distorted letters or "click every traffic light" | Frustrates everyone, bots increasingly solve them, and it shuts out blind, partially sighted, deaf and dyslexic visitors |
| Proof of work (ALTCHA) | The browser quietly solves a small maths problem before the form is sent | Open source, verified on your own server with no outside service; suits a custom-built site; its WordPress plugin is now a paid product |
| Cloudflare Turnstile | Runs checks in the background and at most shows a single checkbox | Free, works on any website, but your server must check the answer |
It costs a spammer real computing time. It takes a person's device a moment, but a spammer sending thousands of messages pays for every one. ALTCHA is an open-source example that you verify on your own server, with no outside service involved. It suits a custom-built site or a developer adding it to their own form.
Turnstile is Cloudflare's free replacement for CAPTCHAs. It never shows images or text to decipher. The points worth knowing, from Cloudflare's own documentation:
On WordPress, Contact Form 7, WPForms and Formidable Forms support Turnstile directly. For other forms, a free community plugin adds it to WordPress login, registration, comments, WooCommerce and most popular form plugins.
A form that silently stops working is worse than spam: real customers think they have contacted you. After any update to WordPress or your form plugin, send yourself a test message.
WordPress Care keeps comment spam out by default and, after each weekly update cycle, checks that the functions you rely on, such as your contact form, still work. The Cloudflare add-on, added to a Noiz hosting plan from the client area, keeps your DNS synchronised to Cloudflare from the control panel and manages Cloudflare at a predefined level.
Read next:
If spam is flooding your forms, open a ticket and tell us what you are seeing.
Checked 19 October 2026.
Threats and accessibility
Cloudflare Turnstile
Open-source and plugins
Noiz
Note: while some of this content was produced with the help of AI, the final editing has been done by a real human being.