Using Web2Phone with Cloudflare Pages
Add a working contact form to any Cloudflare Pages site using a single Web2Phone embed snippet — no backend, functions, or server code required.
If you haven’t created a form yet, start with the Getting Started guide.
Prerequisites
- A Cloudflare account
- A project deployed on Cloudflare Pages
- A Web2Phone account with a form created
- (Optional) WhatsApp enabled on that form if you want WhatsApp delivery
Find Your Cloudflare Pages URL
Cloudflare Pages gives your site a default URL like this:
https://myapp.pages.dev
You might also connect a custom domain (for example https://example.com).
For Web2Phone, we only care about the hostname — not the full URL.
Hostname examples: myapp.pages.dev, example.com.
Add Your Hostnames to Allowed Domains
Web2Phone only accepts submissions from hostnames you authorise.
In Allowed Domains, enter only the hostname —
no http://, https://, slashes, paths, or wildcards.
The www prefix is optional.
Example Cloudflare Pages URL
https://myapp.pages.dev
Allowed Domains entry
myapp.pages.dev
If you’re also using a custom domain (for example https://example.com), add it as an extra line:
example.com
Common mistake
Enter only the hostname.
example.com and www.example.com are treated as equivalent —
you do not need to add both.
Do this in Web2Phone
- Open your form inside the Web2Phone dashboard.
- Find the field Allowed Domains.
- Add
myapp.pages.dev(and your custom domain hostname if used). - Click Save.
As long as the hostname matches your site, Web2Phone will accept submissions.
The www prefix does not matter.
Copy Your Web2Phone Embed Snippet
Each Web2Phone form has a ready-made embed snippet with your public key and endpoint already filled in. You’ll find it in your form settings.
Test Your Form
If it doesn’t work
- Confirm the hostname in Allowed Domains matches your site (the
wwwprefix is optional). - Make sure you pasted the embed snippet for the correct form.
- Check your dashboard for queued or failed submissions.