Set them up in this order: SPF first (see the SPF guide for Microsoft 365), then DKIM, then DMARC starting at p=none. SPF lists who may send for your domain, DKIM signs each message, and DMARC tells receiving servers what to do when a message fails both.
Turn on DKIM in Microsoft 365
- Open the Microsoft Defender portal at
security.microsoft.comand go to Email & collaboration > Policies & rules > Threat policies > Email authentication settings, then open the DKIM tab and select your domain. - While signing is not set up, the status shows
CnameMissing. The page shows the two records you need to publish. Copy them from there; you can also read them with the PowerShell commandGet-DkimSigningConfig -Identity yourdomain.com | Format-List Name,Enabled,Status,Selector1CNAME,Selector2CNAME. - At your DNS host, add two CNAME records with the host names
selector1._domainkeyandselector2._domainkey. The value each one points to is different for every domain, so always use the values Microsoft shows you and never copy them from an example. - Wait for Microsoft to detect the records. That takes a few minutes, and sometimes longer.
- Return to the DKIM tab, select the domain and switch signing on. Once it is on, the option to rotate keys becomes available.
To confirm it, send a message to a mailbox that is not your own and read the Authentication-Results header: it should show a DKIM pass for your domain. Mailing yourself does not prove it.
Add the DMARC record
Microsoft 365 has no setting for DMARC on your own domain. You add one TXT record at your DNS host, with the host name _dmarc. Set up SPF and DKIM for every domain and subdomain you send from first, and send the reports to a dedicated mailbox or group rather than a person’s inbox.
TXT record for _dmarc (replace the report address)
v=DMARC1; p=none; rua=mailto:[email protected]
v=DMARC1marks the record as DMARC.p=noneis the policy. It asks receivers to take no action on failures, so you can read the reports before you enforce anything.rua=mailto:...is where the daily summary reports go. They arrive as compressed XML files, so a DMARC reporting service can make them readable.
Move from none to quarantine to reject
Microsoft recommends a gradual roll-out. Start at p=none and watch the reports. When all of your legitimate mail passes, move to p=quarantine and raise pct step by step (10, 25, 50, 75, 100), then do the same with p=reject. If you have several domains or subdomains, begin with one that sends little mail and leave the main domain for last. Go slowly: a strict policy blocks your own mail if you forgot a sender, such as a CRM or a newsletter tool.
Check both records
Use the DKIM checker with the selectors selector1 and selector2, and the DMARC checker. The domain check looks at SPF, DKIM, DMARC and MX in one run, and the DMARC record generator builds the record for you.
Common mistakes
- Switching signing on before the records are found. Wait until the status no longer says
CnameMissing. - Copying example values. The two CNAME targets belong to your domain only.
- Two DMARC records. A domain has one.
- The wrong host. The DMARC host is
_dmarc, not the root of the domain. - Forgetting an outreach or newsletter tool. Put tools you do not control on a subdomain with its own records, so they cannot hurt the main domain.
- Jumping straight to reject. Start at
p=none.
Sources
The steps follow Microsoft’s own guides: DKIM and DMARC. Using Google Workspace? See DKIM and DMARC for Google Workspace.
Related
- SPF record for Microsoft 365 · The first of the three records.
- DKIM and DMARC for Google Workspace · The same guide for Google.
- Email warm-up schedule · What to do once the records are in.
- Why your emails go to spam · Missing authentication is one of nine causes.
- DKIM checker · Look up a DKIM key by selector.
- DMARC checker · See a domain's DMARC policy.
- DNS records · SPF, DKIM, DMARC and MX in the docs.