Part III: Before You Go Live (now the domain)08
Chapter 08Add-on
Forms and email: a contact form and free email at your domain
Save first, then email. Always.
The classic setup is a contact form from one company, a spam filter from another, an email sender from a third, and a monthly fee for each. Then the form breaks and nobody knows which of the three to blame.
Cloudflare does all of it, and most of it is free:
| Job | Cloudflare piece | In plain terms | Plan |
|---|---|---|---|
| Stop spam | Turnstile | A "prove you're human" check that's usually invisible. No clicking traffic lights. | Free |
| Save every submission | D1 | A small database, so a message is never lost even if an email fails | Free |
| Email you when someone submits | Email Routing send | Sends to your own verified inbox | Free |
| Receive email at your domain | Email Routing | hello@yourbakery.ca forwarded to your existing Gmail | Free |
| Email the visitor (a confirmation) | Email Service | Sends to anyone, from your domain | $5/month plan |
So the one question is: does your site need to email anyone other than you?
- No (most sites): a contact form that lands in your inbox and a
hello@address you read in Gmail. $0. - Yes: "thanks, we got your message" confirmations, booking confirmations, order emails. That's the $5 Workers Paid plan, with 3,000 emails a month included. Email Service pricing.
Honestly, most small businesses don't need the confirmation email. You're going to reply personally anyway, and that reply is the confirmation.
Before you connect email
Finish chapter 7 first. Sending from and receiving at your domain needs the domain and its DNS ready. You can design the form, add spam protection and save test submissions on staging earlier; leave email disconnected until this step. If you want a backup of service secrets in your vault, set up Appendix A.
The forms prompt
Add a contact form to my site, and set up email on my domain. Do all of it
through cf, using command search and schema/help to find the right API calls. My domain is [DOMAIN] and is active
on Cloudflare. Keep production unchanged until I approve launch.
Form:
- Fields: [name, email, phone, message, plus anything specific: event date,
budget, service type...]. Design it to match the site, including clear
error and success states.
- Protect it with Turnstile. Create the widget through the API, put the site
key in the site config and the secret in a Worker secret (if my vault is configured,
save a backup as TURNSTILE_SECRET_KEY). Add rate limiting as well.
- Save every submission to a D1 database first, THEN send the email. If the
email fails, the submission must still be saved. Apply the database
migrations against the staging database as part of this build. Keep
production data separate; review production migrations before launch.
My Cloudflare Workers plan is [Free / Paid]. On Free, only send to my own
verified address and skip the visitor confirmation. On Paid, do both.
Sending:
- Set up sending from my domain. Add every DNS record
it needs (SPF, DKIM, DMARC, anything else) and verify the domain. If SPF or
DMARC records already exist, merge into them. Never create a second one,
and never replace or remove MX records.
- Send each submission to [YOUR EMAIL], from a no-reply address on my
domain, with reply-to set to the person who filled in the form so I can
just hit reply.
- [Paid plan only] Send the visitor a short, friendly confirmation email that sounds like the
rest of the site. It must not repeat anything they typed (otherwise
spammers use your form to send their message to strangers), and rate
limit it per recipient address.
Receiving:
- Set up Email Routing so [hello@MYDOMAIN] forwards to [YOUR EMAIL]. Tell me
when to click the verification email Cloudflare sends me. If MX records or
a rule for this address already exist, leave them alone, even if an API
status check says routing isn't configured.
Then test it end to end on staging: submit the form in a visible browser
window (Turnstile won't pass a hidden, automated one, so use Turnstile's test
keys if you automate it), confirm the submission is in D1, and confirm the
email was sent. Tell me to check my inbox (and spam
folder).Personal details are covered or swapped for examples. Press play, it's silent and loops.
How do I get a free email address with my domain?
Two different things get called "email at my domain": an address people can write to, and an inbox you can reply from. The first is free. The second, from 2027, mostly isn't.
Receiving at your domain is free. Cloudflare Email Routing forwards hello@yourbakery.ca to the inbox you already use, and the forms prompt above sets it up. Incoming email is unlimited on the free plan, and a domain can have up to 200 addresses, so bookings@ and invoices@ can each go to a different person. Turn on the catch-all rule and a typo like helo@ still reaches you.
Replying as hello@ is what's changing. The free trick was Gmail's "Send mail as": reply from Gmail, with hello@yourbakery.ca in the From box. Google is removing it for addresses Google doesn't host, which includes yours. It stops working in January 2027, and Gmail can already refuse to set up new ones. Don't build on it.
So the choice is how you reply. Checked 19 November 2026:
| How you handle email | Cost | Your replies come from | Good for |
|---|---|---|---|
| Email Routing, reply from your own Gmail | $0 | Your Gmail address | One person who's fine replying as themselves |
| Zoho Mail Free | $0 for up to 5 people | hello@yourdomain | A real inbox at your domain for nothing. 5 GB each, one domain, and you read it in Zoho's own app: no IMAP or POP. Not offered in every region |
| Google Workspace Business Starter | US$7 a person a month on an annual plan, US$8.40 month to month | hello@yourdomain, in Gmail | You already live in Gmail and want your domain on every reply |
My take: start with Email Routing and reply from Gmail. Customers care that you answered, not which address it came from. When a second person needs their own inbox, or you want every reply to say hello@, pay for Google Workspace. Zoho is the free way to the same place, if a separate app doesn't bother you.
Moving to a real inbox means your mail goes to that company instead of through Cloudflare's forwarding. Sign up, then hand the DNS to the agent:
I'm moving email for [DOMAIN] to [Google Workspace / Zoho Mail]. I've
signed up and it's asking me to verify the domain. Do the DNS in
Cloudflare yourself and tell me only what I have to click there.
Before you change anything, list my current Email Routing rules so no
address gets lost, and tell me whether the contact form's notification
email will keep arriving after the switch. If it won't, give me the
options and what each costs, and wait.
Then add the verification record, switch the MX records from Email
Routing to the new provider with the shortest gap you can, and set up
SPF, DKIM and DMARC for it. Merge into my existing SPF and DMARC records,
never a second one. Finish with a test email in each direction.Why "save first, then email"
Not in the plan
Want a newsletter? That's a different tool (and a different guide). Cloudflare Email Service is for messages your site sends, like form alerts and order confirmations, not marketing blasts.
On a phone, swipe left and right to turn pages.