Microsoft 365 SPF, DKIM & DMARC DNS records
Microsoft 365 is a mailbox hosting service; to send as your domain it needs include:spf.protection.outlook.com in your SPF record, 2 CNAME DKIM records and a DMARC record that you publish. Automatic setup: Domain Connect (only at registrars that support it).
Last verified 2026-10-20 against the provider's documentation. Rows marked not re-verified come from earlier research. · Mailbox hosting
Microsoft 365 DNS records
| Record | Host | Type | Value | Source |
|---|---|---|---|---|
| SPF | @ | TXT | include:spf.protection.outlook.com Other documented targets: include:spf.protection.office365.us, include:spf.protection.partner.outlook.cn Add inside your existing v=spf1 record; never publish a second one. | Set up SPF to identify valid email sources for your Microsoft 365 domain - Microsoft Defender for Office 365 | Microsoft Learn verified 2026-10-20 |
| DKIM | selector1._domainkey selector2._domainkey | CNAME | Generated in your Microsoft 365 account; copy it from the console. | How to use DKIM for email in your custom domain - Microsoft Defender for Office 365 | Microsoft Learn verified 2026-10-20 |
| DMARC | _dmarc | TXT | v=DMARC1; p=none | Set up DMARC to validate email in Microsoft 365 - Microsoft Defender for Office 365 | Microsoft Learn verified 2026-10-20 |
Who handles SPF for Microsoft 365?
You publish SPF. Add include:spf.protection.outlook.com to your domain's single SPF record (RFC 7208 section 3.2 allows only one) before the all mechanism.
- Other SPF include targets named in the documentation: include:spf.protection.office365.us, include:spf.protection.partner.outlook.cn. Use the one that matches your account.
Source: Set up SPF to identify valid email sources for your Microsoft 365 domain - Microsoft Defender for Office 365 | Microsoft Learn (verified 2026-10-20)
DKIM: 2 records for Microsoft 365
Microsoft 365 documents 2 CNAME DKIM records for your domain.
- DKIM is published as CNAME records that point at keys the provider hosts.
- Microsoft 365 does not rotate these keys automatically; plan manual rotation.
Source: How to use DKIM for email in your custom domain - Microsoft Defender for Office 365 | Microsoft Learn (verified 2026-10-20)
How DMARC passes with Microsoft 365
The documented setup can align through both SPF and DKIM.
DMARC for Microsoft 365
The documentation shows this starter record.
Microsoft 365 routes outbound mail through the high-risk delivery pool when a domain's DMARC policy is p=quarantine or p=reject and the mail fails DMARC at the destination; there is no override.
v=DMARC1; p=none
Source: Set up DMARC to validate email in Microsoft 365 - Microsoft Defender for Office 365 | Microsoft Learn (verified 2026-10-20)
Setup in Microsoft 365
Automatic setup: Domain Connect (only at registrars that support it).
- Defender portal > Email & collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM tab
- Select the domain and copy the two CNAME values under Publish CNAMEs
- Publish selector1._domainkey and selector2._domainkey as CNAME records at your DNS host
- After Microsoft 365 detects the CNAMEs, turn DKIM on for the domain (Toggle to Enabled)
Source: learn.microsoft.com (verified 2026-10-20)
Check your Microsoft 365 setup
Compare your live DNS with these records.
Setup guide
- DKIM key length: 1024 vs 2048 bits (and Ed25519)
- DMARC fails even though SPF and DKIM pass: fixing alignment
- Multiple DMARC records: why none applies and how to merge
- DMARC p=none to quarantine to reject: a safe rollout
- DMARC record syntax errors and how to fix them
- How to read email headers: Received, SPF, DKIM, DMARC
- Outlook.com bulk sender rules and the 550 5.7.515 bounce
- How DKIM works and how to publish a DKIM record
- How to set up a DMARC record, from p=none to p=reject
- How to set up MX records (priorities, null MX, migration)
- Set up SPF, DKIM and DMARC for Microsoft 365
- How to create an SPF record (syntax and examples)
- Two SPF records on one domain: permerror and how to merge
- SPF ~all vs -all vs ?all: softfail, fail and neutral
- SPF syntax errors: every checker message explained
- SPF “too many DNS lookups”: why it happens and how to fix it
More providers in Mailbox hosting
FAQ
Do I add an SPF include for Microsoft 365?
Yes. Microsoft 365's documentation names include:spf.protection.outlook.com. Add it inside your existing SPF record, because a domain may publish only one (RFC 7208 section 3.2).
How does Microsoft 365 publish DKIM?
Microsoft 365 documents 2 CNAME DKIM records. Documented host names: selector1._domainkey, selector2._domainkey.
Does Microsoft 365 require DMARC?
Microsoft 365 routes outbound mail through the high-risk delivery pool when a domain's DMARC policy is p=quarantine or p=reject and the mail fails DMARC at the destination; there is no override.
Sources
- Set up SPF to identify valid email sources for your Microsoft 365 domain - Microsoft Defender for Office 365 | Microsoft Learn
- learn.microsoft.com
- Connect your domain by adding DNS records - Microsoft 365 admin | Microsoft Learn
- Set up DMARC to validate email in Microsoft 365 - Microsoft Defender for Office 365 | Microsoft Learn