This guide walks you through adding DMARC, SPF, and DKIM DNS records in Cloudflare. Cloudflare is one of the most popular DNS providers, offering free DNS hosting with near-instant propagation and a clean, modern interface.
📋 Before You Start
Make sure you have:
- A Cloudflare account with your domain added
- Your domain’s nameservers pointing to Cloudflare (e.g.,
ada.ns.cloudflare.com) - Your DMARC record value — use our DMARC Record Generator if you don’t have one
- Your SPF record value — check your email provider’s documentation for the correct
include:statements
Step 1: Add Your DMARC Record
- Log in to the Cloudflare Dashboard at
dash.cloudflare.com - Select your domain from the list
- Click DNS in the left sidebar, then Records
- Click the + Add record button
- Fill in the fields:
Type TXTName _dmarcContent v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.comTTL Auto(recommended) - Click Save
💡 Pro Tip
Cloudflare automatically appends your domain to the record name. Enter just
Cloudflare automatically appends your domain to the record name. Enter just
_dmarc, not _dmarc.yourdomain.com. Cloudflare shows the full name in the record list after saving.
Step 2: Add or Update Your SPF Record
SPF goes on the root domain (the @ record). You should only have one SPF record — if one already exists, edit it rather than creating a second one.
- Check for an existing SPF record: Look through your TXT records for one starting with
v=spf1 - If one exists, click Edit and modify the content. If not, click + Add record
- Fill in the fields:
Type TXTName @Content v=spf1 include:_spf.google.com ~allTTL Auto - Click Save
⚠️ Common Mistake
Never create multiple SPF records for the same domain. If you have multiple email services (e.g., Google Workspace + Mailchimp), combine them into one record:
Never create multiple SPF records for the same domain. If you have multiple email services (e.g., Google Workspace + Mailchimp), combine them into one record:
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all. See SPF Record Syntax for details.
Step 3: Add DKIM Records
DKIM records are provided by your email service. For example, Google Workspace gives you a TXT record to add. The process in Cloudflare is the same:
- Get the DKIM record details from your email provider (name and value)
- In Cloudflare DNS, click + Add record
- Fill in the fields:
Type TXTName google._domainkey(example for Google)Content The DKIM value from your email provider TTL Auto - Click Save
Cloudflare-Specific Tips
✅ Proxy Status Doesn’t Matter
TXT records don’t have a proxy toggle (orange/grey cloud). This only applies to A and CNAME records. Your email authentication records will work immediately.
TXT records don’t have a proxy toggle (orange/grey cloud). This only applies to A and CNAME records. Your email authentication records will work immediately.
✅ Instant Propagation
Cloudflare DNS changes typically propagate within seconds. You can verify your records almost immediately after adding them.
Cloudflare DNS changes typically propagate within seconds. You can verify your records almost immediately after adding them.
💡 No Quotes Needed
Don’t add quotation marks around the TXT value. Cloudflare handles this automatically. Just paste the raw record value.
Don’t add quotation marks around the TXT value. Cloudflare handles this automatically. Just paste the raw record value.
💡 Long DKIM Values
If your DKIM record is very long (2048-bit keys), Cloudflare will handle it correctly. Some providers require splitting, but Cloudflare does not — paste the full value.
If your DKIM record is very long (2048-bit keys), Cloudflare will handle it correctly. Some providers require splitting, but Cloudflare does not — paste the full value.
Verify Your Records
After adding your records, verify they’re working correctly:
- Use the Domain Checker to verify all records are published
- Check that your DMARC record starts with
v=DMARC1 - Confirm you have only one SPF record starting with
v=spf1 - Send a test email and check the headers for SPF/DKIM/DMARC pass results
What’s Next?
- Read DMARC Record Explained to understand each tag in your record
- Learn about DMARC policies and when to move beyond
p=none - Follow the p=none to p=reject journey for a safe enforcement path
- Check your domain regularly with the Domain Checker