How to add a DMARC record in Cloudflare
DMARC is a single TXT record at _dmarc.yourdomain.com. It tells receivers what to do when SPF and DKIM fail
alignment, and where to send reports.
Before you start
- SPF and DKIM should already work for every service that sends as your domain. See SPF, DKIM and DMARC explained.
- Create or choose a mailbox for reports, such as
dmarc@example.com. Reports are XML files and can be numerous, so use a dedicated address or a reporting service. - Check for an existing record:
dig +short TXT _dmarc.example.com. A domain can have only one.
Add the record
-
In Cloudflare, select your domain and go to DNS then Records.
-
Click Add record.
-
Type:
TXT. -
Name:
_dmarc. -
Content:
v=DMARC1; p=none; rua=mailto:dmarc@example.com -
TTL: Auto. Save.
What the tags mean
| Tag | Meaning |
|---|---|
v |
Version, always DMARC1, and must come first |
p |
Policy: none, quarantine or reject |
rua |
Where aggregate reports go |
pct |
Percentage of mail the policy applies to (optional) |
sp |
Policy for subdomains (optional) |
Roll out gradually
- Start with
p=noneand collect reports for two to four weeks. - Fix any legitimate sender that fails SPF or DKIM alignment.
- Move to
p=quarantine, optionally withpct=25, then raise it. - Finally switch to
p=reject.
Verify
dig +short TXT _dmarc.example.com
You should see your record. Send a test message and check for dmarc=pass in the headers
(how to read them).
Common mistakes
- Putting the full domain in Name instead of
_dmarc. - Misspelling
v=DMARC1or putting another tag first. The record is then ignored. - Reporting to an address in another domain without the authorisation record that domain must publish.
- Jumping straight to
p=rejectand blocking your own newsletters.