What you need
Access to your domain's DNS settings (at your registrar or DNS host), an address that can receive DMARC reports, and the list of everything that sends mail as your domain.
The three records at a glance
| Record | Published at | What it proves |
|---|---|---|
| SPF | TXT on the domain itself | The sending server's IP address is allowed to send for this domain |
| DKIM | TXT at selector._domainkey.domain |
The message carries a valid signature from a key the domain published and was not altered |
| DMARC | TXT at _dmarc.domain |
What receivers should do when neither SPF nor DKIM lines up with the visible From address, and where to send reports |
A finished setup for a placeholder domain looks like this:
example.com. TXT "v=spf1 include:_spf.mailhost.example ~all"
s1._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."
_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
Rolling out DMARC safely
| Stage | Policy | Effect |
|---|---|---|
| Monitor | p=none |
Nothing is blocked; reports show every source |
| Soft enforcement | p=quarantine |
Failing mail goes to spam |
| Full enforcement | p=reject |
Failing mail is refused |
Stay in each stage until the reports show no legitimate source failing. Spend longer on monitoring than feels necessary, because forgotten senders (a billing system, an old newsletter tool) are the usual casualties.
Common pitfalls
- Two SPF records. A domain must have exactly one SPF TXT record. Merge them into one.
- More than 10 lookups. Each
include,a,mx,existsandredirectcounts, and so does everything the included records do in turn. Going over makes SPF fail with a permanent error. - Using
+all. It authorises the whole internet. Never publish it. - Forgetting third-party senders. Newsletter, ticketing and invoicing services each need to be in SPF and should sign with your domain through DKIM.
- Ignoring alignment. DMARC needs the domain that passed SPF or DKIM to match the visible From domain. A service that signs only with its own domain does not help your DMARC result.
- Report mailbox flooding. Aggregate reports are XML files. Use a dedicated mailbox or a report-processing service.
Going further
How the three standards fit together is explained in How Email Authentication Works: SPF, DKIM and DMARC, and the exact tag syntax is in SPF, DKIM and DMARC Syntax Cheat Sheet. To test a message you have received, follow How to Check If an Email Is Spoofed.