include:spf.protection.outlook.com is Microsoft 365’s SPF include: it authorises Exchange Online to send as your domain. “Most Microsoft 365 organizations require include:spf.protection.outlook.com in the SPF TXT record for the domain.” Microsoft recommends ending the record with -all, because it also recommends DKIM and DMARC.
v=spf1 include:spf.protection.outlook.com -all
| Belongs to | Microsoft 365 — Exchange Online |
| Needed on your domain? | Yes — mail from it uses your domain as the envelope sender, so SPF checks this record |
| Microsoft recommends | -all, with DKIM and DMARC |
| Minimum TTL | 3600 seconds |
What it costs, and is it in your record?
We measure include:spf.protection.outlook.com as the page opens. Enter a domain: we read its SPF record, follow every include and say whether Microsoft 365’s is there and what it costs.
What it covers
Mail sent from Microsoft 365 and Exchange Online mailboxes, and through Exchange Online Protection for on-premises servers (with their own addresses added).
Do you need it?
Yes, for every domain that sends from Microsoft 365. SPF checks “the MAIL FROM address, 5321.MailFrom address, P1 sender, or envelope sender”, and Microsoft 365 mail carries your domain there — so “you create an SPF TXT record in DNS for the contoso.com domain to identify Microsoft 365 as an authorized source of mail from contoso.com.”
Your yourcompany.onmicrosoft.com address needs nothing: “The SPF TXT record is already configured for you.”
Its other forms
| Include | For |
|---|---|
spf.protection.office365.us | Microsoft 365 GCC High and Department of Defense. |
spf.protection.partner.outlook.cn | Microsoft 365 operated by 21Vianet, in China. |
Common mistakes
- Two SPF records — “Multiple SPF TXT records for the same domain or subdomain cause SPF to return permerror.” Merge them.
- include:outlook.com or include:hotmail.com: they are Outlook.com’s own consumer records, not Microsoft 365’s include.
- Typos Microsoft lists: a trailing dot (spf.protection.outlook.com.), include= instead of include:, a space after the colon.
- Flattening it: “Microsoft’s sending infrastructure uses dynamic IP addresses that change frequently.”
- Forgetting subdomains: “Each subdomain that you use to send email from Microsoft 365 requires its own SPF TXT record.”
Setting up Microsoft 365: SPF, DKIM and DMARC together →
Questions
Should I end with -all or ~all?
Microsoft recommends -all for Microsoft 365 domains, and notes that “DMARC policy is effectively ignored for SPF ~all failures if the messages don’t also contain DKIM signatures.”
Can I use fewer than 10 includes and still go over the limit?
Yes: “having fewer than 10 include: statements doesn’t guarantee fewer than 10 DNS lookups”, because every lookup inside every include counts. Microsoft suggests moving bulk senders to a subdomain, which has its own 10.
Sources
Checked on 26 September 2026 against these official sources:
- Set up SPF to identify valid email sources for your Microsoft 365 domain — learn.microsoft.com
- External Domain Name System records for Microsoft 365 — learn.microsoft.com