Enable pre-clearance cookies
To enable pre-clearance, you must ensure that the hostname of the Turnstile widget matches the zone with the WAF rules. During the Turnstile configuration setup in the Cloudflare dashboard, you can see the registered zones. Select the appropriate hostname from this list.
The prerequisite is crucial for pre-clearance to function properly. If set up correctly, visitors who successfully solve Turnstile will receive a cookie with the security clearance level set by the customer. When encountering a WAF challenge on the same zone, they will bypass additional challenges for the configured clearance level and below.
For more details on managing hostnames, refer to the Hostname Management documentation.
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Turnstile > Add widget.
- Under Would you like to opt for pre-clearance for this site? select Yes.
- Choose the pre-clearance level from the select box.
- Select Create.
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Turnstile.
- Go to the existing widget or site and select Settings.
- Under Would you like to opt for pre-clearance for this site? select Yes.
- Choose the pre-clearance level from the select box.
- Select Update.