SPF, DKIM and DMARC for Microsoft 365

The DNS records Microsoft 365 needs so your mail is authenticated and stays out of spam.

SPFTXT at @
v=spf1 include:spf.protection.outlook.com ~all
One include covers Exchange Online. Microsoft recommends -all once every sender is listed. Combine with your other senders →
DKIMCNAME / TXTTwo CNAME records, selector1._domainkey and selector2._domainkey, pointing to the targets shown in the Microsoft Defender portal.
DMARCTXT at _dmarc
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Start with p=none and a mailbox you read; build your own.

Step by step

  1. Add the SPF record below at @ (or add include:spf.protection.outlook.com to your existing one).
  2. Open the Microsoft Defender portal at security.microsoft.com → Email & collaboration → Policies & rules → Threat policies → Email authentication settings → DKIM and select your domain.
  3. Copy the two CNAME records it shows. New tenants get targets like selector1-yourdomain-com._domainkey.yourtenant.n-v1.dkim.mail.microsoft; older tenants end in .onmicrosoft.com. Use exactly what your portal shows.
  4. After both CNAMEs resolve, switch Sign messages for this domain with DKIM signatures to Enabled.
  5. Publish DMARC with p=none and tighten it once the reports are clean.

Mistakes that break it

Check that it worked

Rather not touch DNS? I set up SPF, DKIM and DMARC without breaking your other senders, with a before/after report.

Get it fixed on Fiverr

Prefer to do it yourself? Get the step-by-step Fix Kit ($15) – 19-page guide, checklist, 20+ providers.

Other setup guides

Google Workspace · Zoho Mail · Proton Mail · Cloudflare Email Routing · Mailchimp · SendGrid · Amazon SES