Turnstile has added a China‑specific deployment model that keeps both the challenge script and the site‑verify call inside the country’s network. For engineers responsible for user‑facing authentication flows, the change removes the need for cross‑border HTTP requests and can cut latency by an order of magnitude.
What Changed
Turnstile now provides a dedicated China region that is available through the Turnstile Enterprise plan. When a widget is created, the region can be set to china via the dashboard, the public API, or Terraform. The selection is permanent; the region cannot be altered after creation. No separate China Network subscription is required.
Architectural and Operational Implications
Deploying the China region introduces a few concrete adjustments to the typical Turnstile integration:
- Client‑side rendering must load the script from
https://challenges.cloudflare-cn.com/turnstile/v0/api.jsinstead of the global endpoint. - Server‑side token validation must target
https://challenges.cloudflare-cn.com/turnstile/v0/siteverify, keeping the request within the same Chinese network. - Because the widget’s region is immutable, any change in deployment geography requires a new widget and corresponding front‑end updates.
- Latency improvements are a direct result of eliminating international hops; monitoring should reflect lower response times for Chinese traffic.
- Operational tooling (CI/CD pipelines, IaC scripts) must be updated to include the
regionfield when provisioning widgets for Chinese domains.
Implementation Checklist
Follow these steps to adopt the China region for existing or new Turnstile widgets:
- Confirm that your account has the Turnstile Enterprise plan.
- Create a widget with
regionset tochina. Example JSON payload for the API:{ "name": "Widget for China Domains", "domains": ["example.cn"], "mode": "managed", "region": "china" } - Update the front‑end to load the China‑hosted script:
<script src="https://challenges.cloudflare-cn.com/turnstile/v0/api.js" async defer></script> - Adjust server‑side verification to call the China site‑verify endpoint, for example:
curl https://challenges.cloudflare-cn.com/turnstile/v0/siteverify \ --request POST \ --data-urlencode "secret=YOUR_SECRET_KEY" \ --data-urlencode "response=TOKEN_FROM_WIDGET" - Test the end‑to‑end flow from a location inside Mainland China to confirm reduced latency and successful verification.
Related CloudNinjas coverage: security.
What This Means For Practitioners
Teams serving Chinese users should audit their current Turnstile deployments and create China‑region widgets for any .cn domains. Because the region cannot be changed after creation, treat the widget as a permanent architectural artifact. Update automation pipelines to include the region field, and replace the global script and site‑verify URLs with the China‑hosted equivalents. Monitor latency and error rates after migration to verify the expected performance gain. Finally, keep an eye on Cloudflare announcements for any future changes to the Enterprise plan requirements or additional regional options.
