Say you run a bakery called Corner Loaf, and cornerloafbakery.com uses Cloudflare for its DNS (the settings that tell the world where your website and mail live). Your mail host, the company that runs your email (Google Workspace, Microsoft 365, FlatInbox), gives you a list of records to add. The examples here are the ones FlatInbox gives Corner Loaf: your values will differ, but they go in the same boxes.
Check that Cloudflare runs your DNS
Records you add here only work if Cloudflare runs your domain's DNS: its nameservers, the servers that answer for your domain, must be Cloudflare's, with names ending in ns.cloudflare.com (Cloudflare's page). In the dashboard your domain says Active. If it still says Pending, the world isn't asking Cloudflare yet, so records added here do nothing until it does.
If your web host set up Cloudflare for you and you don't sign in to Cloudflare yourself, add the records through your web host, as Cloudflare says to.
Open your DNS records
- Sign in to the Cloudflare dashboard and select your domain.
- Go to DNS, then Records.
- Select Add record. A form opens above the list of records.
In the Name box, type only the part before your domain: _dmarc, not _dmarc.. Cloudflare adds the domain itself. For the domain on its own, type @ (Cloudflare's page).
Add an MX record
An MX record tells other mail servers where to deliver mail for your domain. Corner Loaf's points at FlatInbox's receiving servers:
- Type: MX
- Name:
@ - Mail server:
inbound-smtp.us-east-1. amazonaws. com - TTL: leave it on Auto
- Priority:
10, then select Save
Mail goes to the lowest priority number first. If your domain still has MX records for an old mail host, mail can keep going there, so delete them once your new host says it's ready. MX records have no orange-cloud switch, so there's nothing to turn off (Cloudflare's page on proxy status).
Add TXT records for SPF and DMARC
An SPF record is a TXT record on the domain itself that lists the services allowed to send mail as your domain: each is an include: part, and the ~all at the end covers everyone else. Add one only if a service you send from asks for it. Google Workspace does, with v=spf1 . FlatInbox doesn't need one.
- Type: TXT, Name:
@ - Content: the SPF record your mail host gives you, then Save
A domain can have only one SPF record: with two, both fail. If the list already has a TXT record on your domain starting v=spf1, select Edit on it and add the new include: before the ~all at the end, rather than adding a second record.
A DMARC record tells other mail servers what to do with mail that uses your domain but fails the SPF and DKIM checks. p=none asks them to deliver it as usual, the safe place to start while you set things up:
- Type: TXT, Name:
_dmarc - Content:
v=DMARC1;, then Savep=none
You can paste a TXT value with or without quotation marks. If you leave them out, Cloudflare adds them to a new record when you save, which is why the list shows your value in quotes (Cloudflare's page on TXT records).
Add a CNAME record for DKIM
DKIM puts a signature on each message you send, so the receiving inbox can tell it really came from you. Your mail host keeps the key that checks it, and a CNAME record, a pointer from a name on your domain to a name on theirs, tells inboxes where to find it:
- Type: CNAME
- Name:
fi1._domainkey - Target:
fi1.k7m2p9x4q8ab. dkim. flatinbox. net - Proxy status: switch it off, so it says DNS only
- TTL: Auto, then Save
The orange cloud is the one Cloudflare setting that breaks mail records. Switched on (Proxied), Cloudflare answers for the record with its own addresses and hides where it points, so inboxes can't find your mail host's key and your mail fails the DKIM check. Cloudflare's own advice is DNS only for anything that isn't web traffic (Cloudflare's page). FlatInbox asks for three CNAME records like this one: fi1._domainkey and fi2._domainkey for its DKIM keys, and bounce for the address that collects bounced mail. Add each the same way.
If Cloudflare says a record is locked
If you use Cloudflare Email Routing to forward your mail, Cloudflare locks the MX, SPF and DKIM records it made, so they can't be edited or deleted from DNS › Records. To change them, go to Compute › Email Service › Email Routing, select your domain, open Settings, and select Unlock next to the record (Cloudflare's page).
To keep forwarding with Email Routing, leave them locked. FlatInbox's three CNAME records sit alongside Email Routing's, so you can keep forwarding and still reply as your own address. Our guide to Email Routing and Gmail shows how.
How long it takes
A new record answers from Cloudflare's nameservers almost at once. When we connected a test domain on Cloudflare to FlatInbox on 30 November 2026, our check found all three records within seconds of adding them.
Changing a record that already existed can take longer to show everywhere, because mail servers that looked it up earlier keep their copy for its TTL, the time to live. Auto means 5 minutes (Cloudflare's page on TTL), so after changing a record, wait 5 minutes before you test.
Check that it worked
Cloudflare's own help
We checked every step above against these pages on 30 November 2026: