Set Up SPF, DKIM & DMARC for Microsoft 365

Complete Microsoft 365 email authentication: add the SPF include, enable DKIM with selector1/selector2, and publish DMARC, step by step. Client auto-configuration is the other half of a working tenant: verify the autodiscover CNAME with the Autodiscover checker once these records are in place.

Step 1: Add the SPF include

  • In your DNS panel, create or edit your SPF TXT record at the root domain.
  • Add include:spf.protection.outlook.com to the existing record.
  • Verify with the SPF checker.

Step 2: Enable DKIM

  • Microsoft 365 Defender, Email & collaboration, Policies, DKIM: select your domain.
  • Microsoft displays two CNAME records: selector1._domainkey and selector2._domainkey.
  • Add both CNAME records in your DNS panel (they point to Microsoft’s infrastructure).
  • Back in Defender, click Enable DKIM signing. If it fails, wait 10 minutes for DNS propagation and retry.

Step 3: Publish DMARC

  • Create a TXT record at _dmarc.yourdomain.com.
  • Start with: v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com.
  • Monitor with the report analyzer, then step to quarantine and reject.

Frequently asked questions

Why do I need TWO DKIM CNAME records?+

Microsoft uses selector1 and selector2 for zero-downtime key rotation. Both must be published even though only one is active at a time.

The Enable DKIM button fails. What now?+

The CNAME records haven’t propagated yet. Wait 10-15 minutes and retry. Also verify the CNAME values are exactly as Microsoft displayed.

Can I use a subdomain for Microsoft 365 email?+

Yes, but you’ll need to configure the accepted domain and MX records for that subdomain separately.

Do I need to add SPF for SharePoint or Teams notifications?+

SharePoint and Teams notifications come from Microsoft’s shared infrastructure and don’t need additional SPF. The standard include covers all M365 mail.

What if I have a hybrid Exchange setup?+

You need authentication records for both on-premises and M365 sending paths. This is more complex and requires careful planning.

How do I verify DKIM is actually signing?+

Send a test email and check the DKIM-Signature header and Authentication-Results for dkim=pass. The DKIM checker confirms the DNS side.

Related

Last verified: 2026-11-11