Email

How to set up DMARC in Cloudflare

To set up DMARC in Cloudflare, go to the DNS Records page of your domain, select Add record, choose TXT, enter _dmarc as the Name and v=DMARC1; p=none; rua=mailto:[email protected] as the Content, then select Save. You can also let Email > DMARC Management create the record and collect the reports for you. Either way, start with p=none and only move to quarantine and reject once your reports are clean.

DMARC tells mailbox providers what to do with email that claims to come from your domain but can't prove it, and sends you reports on who is sending as you.

Last verified: November 13, 2026, against Cloudflare's official developer documentation.

Before you start: SPF and DKIM

DMARC passes only when SPF or DKIM passes for your own domain. Cloudflare hosts your DNS, not your mailboxes, so both records come from your mail provider:

  • SPF: one TXT record on @ starting with v=spf1, covering every service that sends as you. See how to add an SPF record in Cloudflare.
  • DKIM: turn it on in your mail provider's admin console (Google Workspace, Microsoft 365…) and publish the key it gives you as a TXT or CNAME record in Cloudflare.

Your domain must use Cloudflare nameservers for these records to count.

Option A: add the record yourself

Step 1: pick an address for reports

Mailbox providers send daily XML reports to the rua address. Use a dedicated mailbox on your own domain, such as [email protected]. An address on another domain needs an extra authorization record on that domain.

Step 2: create the TXT record

  1. Log in to the Cloudflare dashboard and select your account and domain.
  2. Go to the DNS Records page and select Add record.
  3. Type: TXT.
  4. Name: _dmarc.
  5. Content:

    v=DMARC1; p=none; rua=mailto:[email protected]
  6. TTL: Auto.
  7. Select Save.

Option B: use DMARC Management

Cloudflare's DMARC Management reads the reports for you and shows them in the dashboard.

  1. In your domain, go to Email > DMARC Management.
  2. Select Enable DMARC Management.
  3. If you have no DMARC record, select Add to create one (you can edit it later). If you already have one, select Next.

With an existing record, Cloudflare adds a second rua address of its own so that it can receive and process your reports; your existing addresses stay. Cloudflare's documentation notes that the feature only works on the apex domain, not on subdomains, and that the first report can take up to 24 hours to appear. Check the policy of the record it creates, and keep it at p=none to begin with.

Choose one option. Don't create a _dmarc record by hand and another through DMARC Management: two DMARC records make receivers ignore both.

Step 3: read reports, then tighten the policy

  1. p=none for at least one to two weeks. List every service sending as you and fix any that fail SPF and DKIM.
  2. p=quarantine once every legitimate sender passes: failing mail goes to spam. Edit the _dmarc TXT record on the DNS Records page.
  3. p=reject once reports have stayed clean for several weeks: failing mail is refused.

Never start at quarantine or reject: one forgotten sender, such as your invoicing tool, would see its mail sent to spam or refused.

Step 4: check it works

nslookup -type=TXT _dmarc.yourdomain.com

You should see exactly one line starting with v=DMARC1. Our free DMARC checker explains each tag. Then send an email to a Gmail address, open it and choose Show original: SPF, DKIM and DMARC should all show PASS.

Known pitfalls

  • Two DMARC records: often one added by hand and one by a wizard. Keep one.
  • _dmarc.yourdomain.com as the Name: Cloudflare accepts the full name, but check the record list to make sure the result is _dmarc.yourdomain.com and not a doubled domain.
  • Missing mailto: before the report address: the prefix is required.
  • SPF over 10 DNS lookups: SPF then fails with an error, and DMARC depends on DKIM alone.
  • Relying on pct: the updated DMARC standard (RFC 9989, May 2026) removed that tag. Rely on your reports instead.

Frequently asked questions

Does a domain that never sends email need DMARC?

Yes, because spoofers like unused domains. Publish v=spf1 -all (nothing may send) and a DMARC record with p=none and a report address. If a week or two of reports shows no legitimate mail, move to p=quarantine, then p=reject.

Do subdomains need their own DMARC record?

No. Without an sp= tag, your main policy also covers subdomains.

Verify it's fixed. AttackScout reads your DMARC, SPF and public DKIM records, spots duplicates or a policy that's too weak, and tells you when it's safe to tighten it. Free, no account needed. Verify it's fixed

Technical details

Exact configuration. A TXT record on the _dmarc name of your domain:

_dmarc.your-domain.com  TXT  "v=DMARC1; p=none; rua=mailto:[email protected]"

Why. DMARC (RFC 7489) tells the receiving server what to do with an email that claims to come from your domain but passes neither SPF nor DKIM with that same domain name (alignment). p=none observes without blocking; p=quarantine sends to spam; p=reject refuses. rua receives the aggregate reports that show who sends in your name: tighten the policy only after reading them.

To check it yourself. Exactly one line must start with v=DMARC1:

dig +short TXT _dmarc.your-domain.com

Reference: https://www.rfc-editor.org/rfc/rfc7489

Sources

Accessed November 13, 2026.