Guide
DMARC, SPF and DKIM for Microsoft 365
Microsoft 365 sends your email, but it doesn't set up the authentication records for you. This guide covers the three records a Microsoft 365 domain needs and the mistakes we see most.
1. SPF: include Microsoft 365
Your domain needs one SPF record that includes Microsoft's servers:
v=spf1 include:spf.protection.outlook.com -all
If other services also send as you (a CRM, a payroll system, a website form), add them to the same record. A domain must have only one SPF record, and SPF allows at most 10 DNS lookups. See fixing too many SPF lookups.
2. DKIM: publish both selectors
Microsoft 365 signs outgoing mail with a key it holds, using two selectors, selector1 and selector2 (two so it can rotate keys without a break). For each custom domain you publish two CNAME records and then switch DKIM on for the domain. The step-by-step is in how to enable DKIM in Microsoft 365.
3. DMARC: start by monitoring
_dmarc.example.co.uk TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.co.uk"
Then follow the route to p=reject.
Common mistakes
- Two SPF records. Adding a second record for a new service instead of merging it into the first makes SPF fail for everyone.
- Using ~all forever. A softfail is fine while testing, but once DMARC is at quarantine or reject,
-allis the cleaner end state. - DKIM never switched on. The CNAMEs exist but DKIM signing is still off for the domain, so mail is signed with the onmicrosoft.com domain and fails DMARC alignment.
- Third-party senders not aligned. A newsletter or invoicing tool that sends as you needs its own DKIM signature for your domain, or its SPF included.
- Unused domains left open. Every domain you own, including ones that send no mail, should have
v=spf1 -alland a reject policy.
Let Mailfletch check the Microsoft 365 parts
Mailfletch checks mail routing, the SPF include and both DKIM selectors for every domain, and links you to the fix. Run the free check to see where you stand.
Common questions
Do I need DMARC if I use Microsoft 365?
Yes. Microsoft 365 will check DMARC on mail it receives, but it doesn't publish a DMARC record for your domain. That record is yours to create.
How many DKIM selectors does Microsoft 365 use?
Two, selector1 and selector2. Both should be published so key rotation works.