Wellenbrecher

Stop Contact Form 7 spam: its own filters first, then one without a captcha

Contact Form 7 works with four spam filters and a quiz, and none of them is switched on out of the box. Here is how to set them up, what they did in our test, and how a second filter spots bots on your own server without giving visitors a puzzle.

First, so you know who is writing: Wellenbrecher, the plugin in the second half, is ours. Contact Form 7 is not, and we have no connection to the people who build it. If you want to switch form plugins altogether, our comparison of Contact Form 7 alternatives covers that. This post is for people who want to keep Contact Form 7 and get rid of the spam.

Based on the Contact Form 7 source code (tested with version 6.1.7, checked against the current 6.2.4.1 on 8 November 2026), its documentation on contactform7.com, retrieved on 13 September 2026, and a test we recorded on 14 September 2026 in a WordPress Playground with the default form.

Why so much spam gets through Contact Form 7

Contact Form 7 ships with spam protection, but none of it is active out of the box. In the source code, the plugin itself only checks whether the user agent string is shorter than two characters and, for logged-in users, a security token if you switch that on. A bot that presents itself as an ordinary browser gets past this point.

Everything else is a module you set up yourself, and the documentation recommends combining several. One more thing matters a lot with spam: Contact Form 7 does not store submissions itself; that takes the add-on plugin Flamingo. Without it, a message rejected as spam is simply gone.

The video goes through these built-in tools on screen, sends the same two test messages first to Contact Form 7 on its own and then with Wellenbrecher, and finishes with the row in the log:

Thumbnail: a Wellenbrecher log row showing a blocked bot in the Contact Form 7 channel Video: Stop Contact Form 7 spam: its own filters, then one without a captcha6:40 minutes · One click, and only then, loads content from YouTube

The built-in tools: four filters and a quiz

Three of the filters sit in the Contact Form 7 menu under Contact › Integration, a page that by its own description connects your forms with external services. WordPress supplies the fourth, and the quiz is a field in the form.

ToolWhere you set it upWhat it needsWho decides
AkismetActivate the Akismet plugin, add options to form fieldsAn Akismet API keyOutside service
reCAPTCHA v3Contact › IntegrationA Google account, two keysOutside service
TurnstileContact › IntegrationA Cloudflare account, two keysOutside service
Disallowed listSettings › DiscussionWords or IP addresses, one per lineYour server
QuizForm tag in the form editorA question and its answerYour server, every visitor has to answer

Akismet

Akismet is a service run by Automattic, and the plugin comes bundled with WordPress. You need an API key, which according to the Contact Form 7 documentation is free for personal blogs and paid for commercial sites. For Contact Form 7 to ask Akismet, the fields get an extra option:

[text* your-name akismet:author]
[email* your-email akismet:author_email]

From then on, the same documentation says, Contact Form 7 sends Akismet all inputs and data from the environment on every submission, not just the marked fields. That belongs in your privacy policy. Its strength is spelled out on its card on the Integration page: Akismet checks against the global database of spam. Cloud checks and local checks are compared in principle in our Akismet alternative post.

reCAPTCHA and Turnstile

Both need an account with the provider, Google or Cloudflare, and two keys (Site Key and Secret Key) that you paste in under Contact › Integration via Setup integration. reCAPTCHA v3 runs in the background, with no image and no checkbox. The documentation points out that Google plans to move all users to reCAPTCHA Enterprise, which means higher costs for many of them. Turnstile puts a widget at the top of the form, is free according to the documentation, unlike reCAPTCHA, and Contact Form 7 recommends it unless you have a reason to use reCAPTCHA.

According to the source code, Contact Form 7 loads the provider's script (from google.com or challenges.cloudflare.com) on the front end, not only on the page with the form, and checks every submission with the provider. Whether that needs consent is a legal question we are not answering here. It belongs in your privacy policy either way.

The disallowed list

The fourth filter actually belongs to WordPress. Under Settings › Discussion you find the field Disallowed Comment Keys, one word or IP address per line. Contact Form 7 checks every submission against it, all fields plus IP address and user agent. If an entry matches, the message counts as spam and is not delivered.

Two things to know before you add anything. The list matches inside words, and WordPress gives its own example in the field description: “press” also matches “WordPress”. And it applies to comments just the same, so a comment containing one of those words goes to the trash.

The quiz

The quiz is a form tag with a question and its answer, split by a pipe:

[quiz math-quiz "What is 2 plus 3?|5"]

Anyone who answers wrongly or not at all gets the message “The answer to the quiz is incorrect.” The quiz needs no outside service, but every visitor has to answer it.

What the built-in tools did in our test

In the test, two messages went to the same default form. A normal visitor asks whether you are open on Sunday morning and mentions your casino night flyer. A small script sends the form the way a bot would: plain HTML, every field filled in, three links, no login. The three outside services were not set up.

  • Disallowed list with “casino”: Contact Form 7 turned the harmless question away, and the visitor only saw the general error message. The bot script contained no listed word and got through.
  • Quiz in the form: the script left the field empty, and Contact Form 7 stopped it. From then on, though, every visitor had to do the math.

That is not a flaw in the tools. The list reacts to words, no matter who writes them, and the quiz only separates those who answer from those who do not. What is missing is a filter that looks at how a message came about.

The second filter: spotting bots without asking visitors anything

A captcha and a quiz give the human a task. A second filter can look at the traces a bot leaves instead: a hidden field (honeypot) that only a bot fills in, a form sent faster than anyone can type, JavaScript that never ran, an unusual number of links. Each signal on its own is weak, together they draw a clear picture. Why image puzzles and checkboxes are a real hurdle for many people is covered in our post on captchas and accessibility.

That is how Wellenbrecher works. According to its directory listing, more than thirty small signals add points to a score, among them a honeypot, a form token, fill-in time, link density, throwaway email domains and a filter that learns from your own moderation decisions. By default a submission goes to quarantine from 40 points and is blocked from 80. All scoring happens on your server, and the version in the WordPress directory makes no outbound request.

There is nothing to set up for Contact Form 7. Wellenbrecher hooks into the Contact Form 7 spam check as soon as both are active and adds its hidden fields to the form. If another filter such as Turnstile or the disallowed list has already rejected a submission, Wellenbrecher does not overrule it. So you can keep the built-in tools and add the second filter on top.

What happened in the test with Wellenbrecher

To keep it fair, we removed the quiz and the disallowed word first, so Wellenbrecher started from the same form Contact Form 7 had at the beginning. After activation it observes for seven days: suspicious submissions are only flagged and written down, nothing is blocked. For the test we armed it straight away with the Arm it now button on the Wellenbrecher overview.

  • The harmless question, casino flyer and all, typed in by hand, went through. The visitor saw the thank-you line. Mail sending was switched off in this test.
  • The bot script was blocked. Contact Form 7 answered with its spam status, and the bot got the usual error message.
  • The log had one new row: channel Contact Form 7, result Blocked, a score and the reasons, among them a filled-in honeypot field and JavaScript that never ran. The harmless question has no row, because the log only lists what Wellenbrecher flags, holds back or blocks.

Those are two samples from one recording, not a detection rate. The observation week shows you what actually arrives on your site.

There is a limit you should know about. Contact Form 7 has only one spam state, so a visitor held in quarantine also sees the general error message. The difference is on your side: for a quarantined submission Wellenbrecher keeps the entered values in the log, for a blocked one it does not. Releasing an entry does not deliver the message after the fact. The entry leaves the list, and if it contains an email address, that sender passes freely for the next 90 days. So read the values before you release and get in touch with the person yourself.

How to set up the second filter

  1. Test on a copy of your site. Wellenbrecher needs WordPress 6.5 and PHP 8.1.
  2. Install and activate Wellenbrecher. Search for “Wellenbrecher” under Plugins › Add Plugin, or get it straight from the WordPress directory. Contact Form 7 is covered right away.
  3. Check the log while it observes (Wellenbrecher › Log). Every flagged submission is listed there with its score and rules. If a rule fires too often on your site, switch it off or give it less weight in the settings.
  4. Arm it. Observation ends on its own after seven days, or earlier with Arm it now on the overview.
  5. Keep the token route out of the cache. If you use a page cache or a CDN, exclude /wellenbrecher/v1/token from caching.
  6. Change the Contact Form 7 spam message. In the form editor, under the Messages tab, it is the one labelled “Submission was referred to as spam”. Tell a real person how they can still reach you, by phone or email for example.

You can also try it without installing anything: our demo starts WordPress with Contact Form 7, Wellenbrecher and the contact page from the video right in your browser.

When Contact Form 7's own tools are enough

  • Little spam comes in and nobody minds a quiz. Then the quiz is the simplest option without an outside service.
  • You already use Akismet. According to its card it checks submissions against a global spam database. The free Wellenbrecher learns only from your own site.

If spam also reaches you through comments, our Antispam Bee alternative post covers what Antispam Bee does there and where it stops.

A second filter for Contact Form 7

Wellenbrecher scores every submission on your own server, hooks into Contact Form 7 on its own and observes for seven days before it blocks anything. Free in the WordPress directory.

Go to the WordPress directory

Frequently asked questions

Why does Contact Form 7 let so much spam through?

Because out of the box it barely filters. With no module set up, its only check on visitors who are not logged in is whether the user agent string is unnaturally short. Akismet, reCAPTCHA, Turnstile, the disallowed list and the quiz all need setting up by you. Until then, a bot that presents itself as an ordinary browser gets through.

How do I stop Contact Form 7 spam without a captcha?

Without an outside service, Contact Form 7 leaves you the disallowed list and the quiz. The list only reacts to specific words, and the quiz asks every visitor. A second filter such as Wellenbrecher instead scores each submission on your own server, using signals like a honeypot, fill-in time and JavaScript, and asks nobody anything.

What does a visitor see when their message is treated as spam?

Contact Form 7 shows a general error message: There was an error trying to send your message. Please try again later. The message is not delivered. You can change that text in the form editor under the Messages tab, ideally adding a second way for a real person to reach you.

Can I use Akismet or Turnstile together with Wellenbrecher?

Yes. They all hook into the same Contact Form 7 spam check. If another filter has already rejected a submission, Wellenbrecher does not overrule it. The Contact Form 7 documentation itself recommends combining different types of spam protection.

Back to blog A post by hafenstudios