SPF, DKIM and DMARC for Cloudflare Email Routing

The DNS records Cloudflare Email Routing needs so your mail is authenticated and stays out of spam.

SPFTXT at @
v=spf1 include:_spf.mx.cloudflare.net ~all
Cloudflare creates v=spf1 include:_spf.mx.cloudflare.net ~all and locks it. If you also send as this domain (Gmail "Send mail as", a newsletter tool), that sender has to end up in the same single SPF record. Combine with your other senders →
DKIMCNAME / TXTCloudflare adds a locked TXT record at cf2024-1._domainkey together with the MX records (route1/2/3.mx.cloudflare.net).
DMARCTXT at _dmarc
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Start with p=none and a mailbox you read; build your own.

Step by step

  1. In the Cloudflare dashboard open Email → Email Routing → Routing rules and create a custom address (e.g. hello@) that forwards to your inbox.
  2. Add the destination address. Cloudflare emails a verification link, except when it is your Cloudflare login address.
  3. Go to Settings → DNS records and click Add missing records: three MX records, the SPF TXT and the DKIM TXT.
  4. Keep or add DMARC. A domain that only receives can stay at p=reject.

Mistakes that break it

Check that it worked

Rather not touch DNS? I set up SPF, DKIM and DMARC without breaking your other senders, with a before/after report.

Get it fixed on Fiverr

Prefer to do it yourself? Get the step-by-step Fix Kit ($15) – 19-page guide, checklist, 20+ providers.

Other setup guides

Google Workspace · Microsoft 365 · Zoho Mail · Proton Mail · Mailchimp · SendGrid · Amazon SES