Docs • Platform Guide

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.

Step 1

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
Step 2

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.

Step 3

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

  1. Open your form inside the Web2Phone dashboard.
  2. Find the field Allowed Domains.
  3. Add myapp.pages.dev (and your custom domain hostname if used).
  4. Click Save.

As long as the hostname matches your site, Web2Phone will accept submissions. The www prefix does not matter.

Step 4

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.

Step 6

Test Your Form

🧯

If it doesn’t work

  • Confirm the hostname in Allowed Domains matches your site (the www prefix is optional).
  • Make sure you pasted the embed snippet for the correct form.
  • Check your dashboard for queued or failed submissions.