What Cloudflare Email Routing is
Email Routing accepts mail sent to an address like info@example.com and forwards it to a regular mailbox — Gmail, corporate mail, or any other address. No mail server is needed on your side; Cloudflare's infrastructure handles the mail.
The service solves a common task for site owners: an address on your own domain is needed for contact forms and business cards, but deploying Postfix or paying for a mail plan just for a few addresses isn't worth it.
How Email Routing differs from a full mail server
Email Routing is forwarding, not storing and sending mail on your own behalf in the general case.
| Capability | Email Routing | Mail server or SMTP hosting |
|---|---|---|
| Receiving mail at a domain address | Yes, free | Yes, needs setup and a plan |
| Storing mail on your side | No, forwarding only | Yes, has its own inbox and folders |
| Sending mail from a domain address | Only through Email Workers | Yes, full SMTP |
How to enable Email Routing and connect a domain
The section is in the Dashboard under Email → Email Routing. The domain must already be managed through Cloudflare, as described in the article on connecting a site to Cloudflare. Once enabled, the service adds the needed MX and TXT records to the DNS zone itself.
example.com. MX 10 route1.mx.cloudflare.net.
example.com. MX 65 route2.mx.cloudflare.net.
example.com. TXT "v=spf1 include:_spf.mx.cloudflare.net ~all"
If the zone already had MX records from a previous mail provider, remove them — two sets of MX records at once cause some mail to be lost. Working with zone records is covered in the article on DNS records and Proxy mode.
Forwarding rules: specific addresses and catch-all
Forwarding rules are set up under Routing rules and work following one of these patterns:
- a separate address per rule: info@example.com forwards to a personal mailbox
- a catch-all rule: all mail to non-existent domain addresses goes to one mailbox
- an address for verification before activation: Cloudflare sends a confirmation code to the target mailbox
- several rules pointing to the same target address for different departments
Sending mail through Email Workers
When you need more than forwarding — processing a message with code, for example parsing the subject and routing by rules the interface doesn't offer — connect a Worker with an email handler.
export default {
async email(message, env, ctx) {
const subject = message.headers.get("subject") || "";
if (subject.includes("invoice")) {
await message.forward("billing@example.com");
} else {
await message.forward("info@example.com");
}
},
};
For more on how such functions are written and deployed, see the article on Cloudflare Workers.
Limits and what to watch for
Before moving domain mail over, keep these service quirks in mind:
- sending mail directly from a domain address through a regular SMTP client is not supported
- the target mailbox is verified once and must be a real, working address
- changing MX records can cause a delivery pause until senders' DNS caches update
- sending transactional mail from a site needs a separate SMTP provider, not Email Routing
Summary: connection checklist
Email Routing solves the need for an address on a domain where a full mailbox with storage and sending isn't required.
- enable Email Routing in the Dashboard and verify the target address
- remove old MX records if the domain was previously served by another mail provider
- set up a rule for each needed address or a catch-all for everything else
- connect an Email Worker if conditional forwarding is needed
- pick a separate SMTP service for sending mail from the site