
Contact Form 7 can connect directly to Cloudflare Turnstile through its native integration module. You do not need to paste a generic widget script into the form or install a second Turnstile addon for the same job. The practical work is choosing the correct widget, connecting its keys, and confirming that legitimate visitors can complete the form while failed verification remains a failure.
This guide covers the native integration introduced in CF7 6.1. It is a setup and verification procedure based on official documentation, not a claim that we ran a spam benchmark. If you are choosing between several spam controls, start with our spam protection comparison.
Confirm the integration and the environment
Open Contact → Integration in WordPress and look for the Turnstile section. Record the installed CF7 version before changing anything. If the section is missing, verify the version and the plugin’s current requirements; do not compensate by layering unrelated integration plugins without understanding who will render and validate the widget.
Identify every hostname where visitors actually use the form, including a www variant or a separate staging hostname when applicable. A page on a preview hostname and a page on the public hostname are different verification contexts. Decide which environment you are configuring before copying any keys.
Turnstile works independently of Cloudflare’s proxy service. Putting the site’s DNS behind Cloudflare is not a prerequisite for this native form integration. The current Free plan provides up to 20 widgets and ten hostnames per widget, with unlimited challenges. Enterprise has separate capabilities and pricing. Those service limits do not establish CF7 compatibility with every Enterprise feature.
Create a widget and connect the native module
- In your Cloudflare account, create a Turnstile widget with a recognizable environment-specific name.
- Configure the intended hostnames and choose Managed mode, as recommended in CF7’s integration documentation.
- Keep the site key and secret key together as a pair. The site key identifies the widget publicly; the secret belongs in server-side configuration.
- Return to Contact → Integration → Turnstile → Setup integration and enter that pair.
- Save, then inspect the actual public form page in a fresh visitor session.
Use CF7’s integration screen for the native module rather than adding the secret to a page, form field, JavaScript snippet, screenshot, or support ticket. Cloudflare’s generic documentation explains both browser rendering and server validation; CF7 supplies the integration between them. Adding a second generic implementation can create confusing duplicate widgets and competing token handling.
The integration applies to the site’s CF7 forms. Review more than the page you first opened: an inquiry form in a footer, an embedded form on another landing page, and a longer request form may have different layouts and asset conditions. A successful save in WordPress is only configuration evidence.
Choose a clear widget position
By default, CF7 places the Turnstile widget at the beginning of the form. To choose another position, add the native form-tag to the Form tab at the desired location. A compact variant can help where the available width is limited:
[turnstile size:compact language:en]
Use the form-tag once in a deliberate location. This example is form-template syntax, not a WordPress page shortcode. CF7 documents additional options for action, appearance, language, size, tabindex, and theme. Start with the default behavior and change a specific option only when it resolves a real layout or interaction need.
Inspect the widget on a narrow phone viewport, with zoom, and after field validation errors appear. Leave room for a challenge or explanatory state. Do not hide the widget container simply because the first successful state looks larger than expected. The visitor needs to understand an outstanding verification step before pressing Submit repeatedly.
Separate staging checks from production protection
Cloudflare publishes dummy site keys and secret keys for controlled testing. Use an appropriate pair only in an isolated development or staging environment. A passing dummy key is useful for a repeatable submission path, and a failing pair is useful for checking how the page handles rejection. Production secrets reject dummy tokens, so mixing the two environments does not produce a meaningful test.
Keep a short environment record: hostname, widget name, key pair reference, owner, and expected behavior. Store references rather than secret values in the shared checklist. Before release, confirm that production uses its intended real pair and allowed hostnames. An always-passing staging configuration says nothing about protection against real bots.
A token is time-limited and can be validated once. Cloudflare documents a five-minute validity period. For a long inquiry form, include a delayed completion case and a second submission after the first result. Let the supported integration manage refreshed challenges; do not reuse a captured token as if it were a permanent permission.
Verify the complete visitor outcome
Use synthetic information and a controlled destination in staging. Check an ordinary completion, a missing required field, a failed verification scenario, and correction followed by resubmission. Record what the visitor sees, whether the submission request completes, and whether the downstream record or notification expected for that case appears.
Keep validation, spam classification, mail transport, and inbox receipt separate. A successful challenge does not prove that mail was sent. A successful mail operation does not guarantee an inbox placement. Use the CF7 testing checklist to cover those later stages, and review Akismet field mapping separately if that module is also part of your setup.
Troubleshoot with evidence
If a widget does not render, inspect the visible browser error and the requests for its assets. Check hostname configuration, the saved key pair, duplicate integrations, and optimization changes that delay or remove required scripts. If the widget appears but the request fails, retain the response and relevant server-side error at the same timestamp.
Ask the responsible administrator to review a specific blocked request or configuration mismatch. Do not turn off the site’s protections broadly to make one attempt pass. A useful incident note contains the form and page, environment, timestamp, sanitized error, and the single change that was evaluated. Recheck the original failure case after correction.
Monitor after setup
After release, compare submission trends with the same reporting definitions and period lengths. Svetlik Analytics for Contact Form 7, our free plugin, provides a dashboard for submission trends and statistics. It is separate from Turnstile verification and does not establish challenge effectiveness, visitor abandonment, or inbox delivery.
Keep the configuration reference and visitor checklist with the form’s maintenance notes. Review them when the hostname, CF7 version, optimization layer, or form placement changes.
Official sources
Reviewed October 14, 2026.
