A solo founder, a small agency, or a non-profit owns a domain and wants hello@example.com, support@example.com, and billing@example.com to land in a personal Gmail or Workspace inbox — without paying per-mailbox for a hosted email plan they don’t need yet. Cloudflare Email Routing is the simplest path: free forwarding of unlimited custom addresses on a Cloudflare-hosted domain to verified destination inboxes, with the DNS records auto-managed. This article walks the setup end to end, explains why the service is receive-only, and lists the failure modes — most of which trace back to MX records drifting later.
How to verify
Before configuring anything, confirm the domain’s DNS is on Cloudflare. Email Routing only works for zones served by Cloudflare’s nameservers — the MX, SPF, and DKIM records it manages live in your Cloudflare DNS zone.
# 1. Confirm the domain uses Cloudflare nameservers
dig +short NS example.com
# 2. After enabling Email Routing, confirm the MX records published correctly
dig +short MX example.com
# Expect three MX records pointing at route1/2/3.mx.cloudflare.net
# 3. Confirm the SPF TXT record allows Cloudflare to forward
dig +short TXT example.com | grep spf1
# 4. Send a test from any external account and tail the routing dashboard
echo "test" | mail -s "routing test" hello@example.com
If dig NS returns anything other than the two <name>.ns.cloudflare.com nameservers Cloudflare assigned to the zone, fix that first — Email Routing’s setup screen will refuse to proceed.
What’s happening
Email Routing is a postal-forwarding service operated by Cloudflare. When mail arrives at the MX records Cloudflare publishes for your domain, it lands at Cloudflare’s MTA servers. Cloudflare looks up the recipient address (hello@example.com) against the routing rules you configured, finds the verified destination (founder@gmail.com), and re-sends the message to that destination. The destination inbox receives the message with its original From: header preserved and a Cloudflare-added X-Original-To: so you can filter on the alias.
The service is receive-only. Cloudflare forwards inbound mail; it does not let you send outbound mail from hello@example.com. If a customer replies to a forwarded message, the reply goes to the original sender’s address (the customer themselves see the original From, not your inbox). If you want to send from: hello@example.com, you need a separate SMTP service — Gmail’s “Send mail as” + Workspace SMTP relay, a transactional provider like Postmark or Resend, or a self-hosted MTA. Email Routing handles inbound only by design; it removes the complexity of running an inbound MTA so you can defer the outbound question.
DNS is the load-bearing piece. Email Routing publishes three records to make inbound work: three MX records pointing at route1.mx.cloudflare.net, route2.mx.cloudflare.net, route3.mx.cloudflare.net; an SPF TXT record (v=spf1 include:_spf.mx.cloudflare.net ~all); and a TXT verification record while the destination is being verified. Cloudflare creates these automatically when you enable the service and shows a warning if any of them are deleted or overwritten later.
The procedure
1. Enable Email Routing on the zone
In the Cloudflare dashboard, open the zone for example.com, go to Email → Email Routing → Get started. Cloudflare runs a precheck: it looks for existing MX records, warns if you already have a hosted email provider attached (Google Workspace, Microsoft 365, Fastmail), and asks for confirmation before overwriting MX. If the zone has no existing MX, the precheck is a single click.
Cloudflare then publishes three MX records and one SPF TXT record into your DNS zone. You can see them in the DNS tab afterwards — they’re marked as managed by Email Routing and changes are reverted automatically.
2. Verify a destination address
A destination is the real inbox that receives the forwarded mail. Cloudflare requires verification: you add the address in the dashboard, Cloudflare sends a verification email to it with a click-through link, and the address becomes available as a route target once you click. You can have multiple destinations — founder@gmail.com, support@external-help-desk.com, etc. — and route different aliases to different destinations.
You cannot route mail to an unverified address. The verification email has a 24-hour expiry; if it lapses, re-send from the dashboard.
3. Create custom address rules
A custom address rule maps <alias>@example.com → <verified destination>. Add them one by one in Routing rules → Custom addresses:
| Custom address | Destination |
|---|---|
hello@example.com | founder@gmail.com |
support@example.com | support-team@gmail.com |
billing@example.com | founder@gmail.com |
legal@example.com | lawyer@external-firm.com |
Each rule takes effect within seconds. The dashboard shows last-delivered timestamps per rule, which is the quickest way to confirm a rule is wired (send a test, refresh, see the timestamp update).
4. Set the catch-all rule
The catch-all rule decides what happens to mail addressed to anything not in the custom-address list — e.g. typo@example.com, random-name@example.com. Options:
- Drop — the message is silently discarded. Safe but you may miss legitimate mail to addresses you forgot to create.
- Send to a destination — forward to one verified destination, e.g.
founder@gmail.com. This is the most common choice for solo and small-team setups; misaddressed mail still reaches a human.
Set the catch-all in Routing rules → Catch-all address. For a domain that previously had hosted email and is migrating, the catch-all is the safety net that catches anything the migration missed.
5. (Optional) Add a Worker for custom logic
For routes that need more than forward-as-is — auto-reply, attachment scanning, route to a webhook, log to KV — Email Routing can hand the message to a Worker via the email event:
// worker that auto-replies to a specific alias and forwards everything else
export default {
async email(message, env) {
if (message.to === 'autoreply@example.com') {
// Cloudflare's reply API is currently limited; check current docs
// before relying on outbound from a Worker.
{/* TODO-VERIFY-CF: confirm the current Worker email send API surface */}
return;
}
await message.forward('founder@gmail.com');
}
};
The Worker is wired to a custom address in the Email Routing UI (Routing rules → Custom address → Send to a Worker). Most setups never need this; reach for it when forwarding alone isn’t enough.
6. Stay within the free tier
Email Routing is free at the tier most teams operate at: unlimited custom addresses on the domain, up to 200 destination addresses, and forwarding volume that comfortably covers single-team operations. The free tier has reasonable rate limits — high-volume marketing replies would not fit. If you find yourself approaching the destination cap, that’s the cue to move to a real mailbox provider, not to keep stretching Email Routing.
Common pitfalls
- Adding a hosted email provider later, breaking forwarding — installing Google Workspace or Microsoft 365 publishes new MX records that override Cloudflare’s. Email Routing stops working the moment another MX takes priority. Disable Email Routing before switching providers, or accept that the two services do not coexist on the same MX.
- Manual MX edits in the DNS tab — adding a custom MX record (e.g. for a marketing platform) below Cloudflare’s MX is harmless; replacing Cloudflare’s MX breaks routing immediately. If you must edit MX records, do it from the Email Routing settings, not the DNS tab.
- Forgetting the service is receive-only — a reply you send from your Gmail goes from
founder@gmail.com, not fromhello@example.com. Customers see the personal address. If brand consistency on replies matters, set up “Send mail as” in Gmail or use a dedicated SMTP service. - SPF record overwritten by another tool — a transactional email tool that adds itself to SPF and overwrites Cloudflare’s include breaks inbound SPF alignment. Always merge include directives into the existing TXT record; never replace it.
- Destination silently bounces — Gmail spam-filters forwarded mail aggressively if the sender domain’s DMARC is strict. Check the destination’s spam folder before assuming Email Routing is dropping mail.
For teams running a domain on Cloudflare with Pages, Workers, and now Email Routing in the same dashboard, Stack Harbor handles the MX hygiene, catch-all policy, destination rotation, and the alerting that catches a silent forwarding outage — see how we operate managed operations for clients on the Cloudflare stack. For the wider DNS picture this builds on, see the DNS zone setup article.