DNS guide
Adding email records in Cloudflare
Cloudflare adds your domain to every name automatically, so enter only the part before it.
By Ahmet Karaca · Updated · Checked against Cloudflare documentation on
Steps
- Log in to the Cloudflare dashboard and select your domain.
- Open DNS → Records and click Add record.
- Choose the record type, enter the name (use @ for the root domain, _dmarc for DMARC) and paste the value into Content.
- Leave TTL on Auto and click Save.
Common mistakes
- Turning on CNAME flattening, for the whole zone or just the DKIM CNAME, makes Cloudflare answer with an A record instead, and your email provider can no longer read the DKIM record.
- A mail server host name such as mail.example.com must stay DNS only. SMTP, IMAP and POP3 do not pass through Cloudflare's HTTP proxy, so a proxied mail host stops mail clients from connecting.
- Records in Cloudflare only matter once your registrar lists Cloudflare's nameservers. The zone stays at Pending Nameserver Update until that change goes through, which can take up to 24 hours.
- If DNSSEC is on at your registrar, turn it off before switching to Cloudflare's nameservers. Cloudflare warns that changing nameservers with DNSSEC active can make the domain unreachable.
Watch out for
- Set every CNAME used for DKIM or a return-path to DNS only (grey cloud). Proxied CNAMEs break email authentication.
- Cloudflare splits long TXT values into 255-character strings for you.
Frequently asked questions
What does Auto TTL mean in Cloudflare?
Auto is 300 seconds. Your local DNS cache can still take longer than five minutes to show a change.
Can I proxy MX or TXT records in Cloudflare?
No. Only A, AAAA and CNAME records can be proxied; MX and TXT records are always DNS only.
Do I need to put quotes around a TXT value in Cloudflare?
No. If you save a new TXT record without quotes, Cloudflare adds the double quotes itself. Unbalanced quotes, such as a single leading quote, are flagged as invalid content.
Why won't Cloudflare let me proxy my DKIM CNAME?
Cloudflare warns about or blocks proxying CNAMEs it recognizes as DKIM validation records, to stop a misconfiguration before it happens.
Can Cloudflare receive mail for my domain without a mail provider?
Only as forwarding. Cloudflare Email Routing forwards mail sent to custom addresses for free; to send and receive mail you need an SMTP provider.
What to add
Pick the service you're setting up to see the exact records:
Mailbox providers
Marketing platforms
Official reference: Cloudflare documentation.
Check your Cloudflare setup
Or open the SPF checker, DKIM checker or DMARC checker directly.