Static hosting without a backend
Cloudflare Pages builds and serves your static site - it does not run a server that can receive form POSTs. Point your form’s action at the FormsReach submit endpoint and keep a hidden api_key field. No Pages Function, Worker, or third-party backend is required for basic email or WhatsApp delivery.
Platform notes
- Method must be POST; action must be the FormsReach submit URL.
- The hidden
api_keyfield is required so submissions route to your account - it’s your form’s public key, safe to ship in static HTML. - Preview deployments get their own
*.pages.devsubdomain per build unless you configure a stable preview alias - allowlist the project-level*.pages.devdomain to cover them. - If you add a Pages Function or Worker in front of the form to do extra validation, move the API key into that function’s environment bindings instead of a hidden client field.
Troubleshooting
- Preview deploy submissions blocked: Add your project’s
*.pages.devdomain (not just the custom domain) to Allowed domains. - Nothing arrives: Confirm the hidden
api_keyfield name and value match the key on your form’s dashboard overview. - Env var not showing up in the form: Cloudflare Pages build-time environment variables aren’t injected into plain static HTML at runtime - use the public key directly in the snippet, or inject it at build time if you’re using a framework with its own env prefix (see the Astro or React guides).
- Domain denied on production: Open the form’s Allowed domains list and add the custom domain mapped to your Pages project.