Xpoudy

How to Set Up Microsoft 365 SPF in Cloudflare

Short answer

If Microsoft 365 sends all mail for your domain, publish one TXT record at the root containing v=spf1 include:spf.protection.outlook.com -all. If other services send for the same SPF hostname, amend the existing single SPF record so it still authorizes the legitimate senders.

By Xpoudy ·

Identify the outbound senders for the hostname

Start in the authoritative Cloudflare zone. Search existing TXT records and inspect the value beginning v=spf1. List mail sent by Exchange Online and any ticketing, transactional or marketing system. Some systems use their own envelope subdomain, so check a real message or their setup instructions before adding them to the root policy.

Publish the Microsoft record in Cloudflare

For an organization using Microsoft 365 as its only sender at the root, enter these fields in DNS → Records.

FieldExample
TypeTXT
Name@
Contentv=spf1 include:spf.protection.outlook.com -all
TTLAuto

On an existing domain, edit the policy at the applicable hostname. Preserve any required includes and review the DNS lookup limit. If the domain already uses a different policy ending, coordinate any policy change with the mail administrator.

Confirm what Exchange Online used

Use Xpoudy’s SPF Checker to verify the single public TXT record and the Microsoft include. Send from the domain to an inbox you control and inspect the recorded SPF identity in the headers. If the header reports pass for a different envelope domain, check whether DKIM provides the alignment needed for your DMARC result.