Learn
How to set up DMARC: record, reports and a safe rollout
How to set up DMARC: publish a TXT record at _dmarc with p=none, read the reports, fix failing senders, then move to quarantine or reject with care.
Before you start
How to set up DMARC, in short: publish one TXT record named _dmarc with p=none, read its reports, fix the senders that fail, and only then tighten the policy.
Have these ready:
- SPF or DKIM on every service that sends as your domain, preferably both. Google says to allow 48 hours after setting them up before adding DMARC. If DKIM is missing, start with how to set up DKIM.
- A group or dedicated mailbox for reports. Google and Microsoft both advise against a personal one.
A message passes DMARC when SPF or DKIM passes for a domain aligned with the From domain. Alignment is relaxed by default, so news.example.com aligns with example.com.
Steps
-
List every service that sends as your domain. Include newsletter tools, CRM, billing and website forms.
-
Make each service align. Set up DKIM signing with your domain (the
d=value) at the service, or change its MAIL FROM (envelope sender) to your domain and authorize the service in that domain's SPF record. A service that uses its own domain for both can pass SPF and DKIM and still fail DMARC. A name must have only one SPF record: add the service to the existing record and never publish a second one. Past 10 DNS lookups, SPF returnspermerrorand stops passing. -
Create the report mailbox. If it sits on another domain, that domain must authorize the reports or receivers ignore the address. For
example.comwith a mailbox onreports.example.net, the authorization is a TXT record atexample.com._report._dmarc.reports.example.netwith this value:TXTv=DMARC1; -
Publish the record in monitoring mode. If
_dmarcalready has a record, edit it. Otherwise add a TXT record named_dmarcwith this value, using your own address:TXTv=DMARC1; p=none; rua=mailto:dmarc@example.com
RFC 9989, the current DMARC standard, says
p=nonemust not change existing mail handling. Withoutrua, receivers send no aggregate reports. The DMARC generator builds this value for you. -
Read the reports and cover your slowest sending cycle. Reports are XML files, usually sent once a day, listing each sending IP with its SPF, DKIM and DMARC results. Google says one week is usually enough. If your users might post to mailing lists and you want to reach
p=reject, RFC 9989 asks for at least a month here and as long again atp=quarantine. -
Fix every legitimate source that fails. RFC 9989 requires this before enforcement. In a report,
passunderauth_resultswithfailunderpolicy_evaluatedmeans the service authenticated but did not align. -
Move to
p=quarantine. As Microsoft advises, start with a low-volume subdomain or domain, with its own record at_dmarc.news.example.com, and keep the parent atp=noneuntil the others are clean. This is the value; on the parent, change onlyp:TXTv=DMARC1; p=quarantine; rua=mailto:dmarc@example.com
With the mailbox on another domain, also authorize
news.example.com._report._dmarc.reports.example.net, as in step 3.Caution: legitimate mail that fails DMARC can now go to spam at receivers that honor your policy.
-
Decide whether to publish
p=reject. Microsoft says to monitor the effects ofp=quarantinefor enough time first. Go on only if no legitimate source is failing. Then use the same record withp=reject.Caution: rejected mail is never delivered. RFC 9989 says a
p=rejectdomain must sign with DKIM, because relayed mail will most likely fail SPF. It also says domains whose users might post to mailing lists should not publishp=reject. RFC 9989 leaves the final value to your needs, so you can stop atp=quarantine.
DMARC record setup at your DNS host
Some DNS hosts add your domain to the name automatically, so entering the full name creates _dmarc.example.com.example.com. Check the result after saving. See DMARC on Google Workspace and DMARC on Microsoft 365.
DMARC configuration for subdomains
A record at _dmarc.example.com also covers subdomains without their own record. They follow p unless you set sp or np, so without those tags tightening the parent tightens them too. Sending only from news.example.com does not remove the need for the step 4 record at _dmarc.example.com: RFC 9989 also asks for one at the organizational domain.
Confirm it worked
-
Look up the record. You want exactly one answer that starts with
v=DMARC1. The DMARC checker reads the same record.nslookup -type=TXT _dmarc.example.com 1.1.1.1 -
Send a message to a mailbox at another provider and open its full headers. In
Authentication-Results, look fordmarc=passwith your domain inheader.from=. The format varies by receiver. -
Wait for the first aggregate report. Periods typically cover one UTC day, and not every receiver sends reports. If none arrives after several days, see DMARC reports not arriving.
Common mistakes
- Two records at
_dmarc. RFC 9989 has receivers discard all of them when several are returned. Merge them into one. v=DMARC1out of place. The tag must come first and its value is case sensitive, or the whole record is ignored.- Hardening SPF to
-allduring the rollout. RFC 9989 warns that a receiver can reject on SPF failure before DMARC runs, even a message with aligned DKIM. Those messages never appear in your reports. - Ramping up with
pct=. Google and Microsoft still document it, but RFC 9989 removed it because receivers applied partial values inaccurately. Its partial replacement,t=y, asks for one level below your policy.