← Blog/Authentication

How to Set Up SPF Record for Microsoft 365 (Office 365)

June 12, 2025·3 min read·By MailPilot

Microsoft 365 (formerly Office 365) accounts send email through Microsoft's servers. Without an SPF record authorizing Microsoft's servers for your domain, receiving mail servers cannot verify that your Microsoft 365 emails are legitimate — leading to spam placement or outright rejection. Here's the exact SPF record to use and where to add it.

The SPF Record for Microsoft 365

Add this TXT record to your domain's DNS:

  • Type: TXT
  • Host / Name: @ (your root domain)
  • Value: v=spf1 include:spf.protection.outlook.com ~all
  • TTL: 3600 (1 hour)

If you also send from other services (Google Workspace, SendGrid, HubSpot, etc.), combine their includes in a single record: v=spf1 include:spf.protection.outlook.com include:_spf.google.com ~all. You can only have one SPF TXT record per domain.

Where to Add the SPF Record by Registrar

GoDaddy

Domains → Manage DNS → scroll to TXT Records → Add. Type: TXT, Name: @, Value: the SPF string above, TTL: 1 Hour. Click Save.

Namecheap

Domain List → Manage → Advanced DNS → Add New Record. Type: TXT Record, Host: @, Value: the SPF string, TTL: Automatic. Click the green checkmark.

Cloudflare

DNS → Add Record. Type: TXT, Name: @ (or your domain), Content: the SPF string. Set proxy to "DNS only" (grey cloud). Save.

AWS Route 53

Hosted Zones → your domain → Create Record. Type: TXT, Record name: leave blank for root, Value: wrap the SPF string in double quotes. Create records.

Common Mistakes

  • Duplicate SPF records: If a TXT record with v=spf1 already exists, edit it — do not add a second one. Two SPF records break SPF validation entirely.
  • Wrong include: The correct include for Microsoft 365 is include:spf.protection.outlook.com. Some older guides list include:outlook.com — this is incorrect and will fail verification.
  • Exceeding 10 DNS lookups: SPF is limited to 10 DNS lookups per evaluation. If you have many ESPs, use an SPF flattening tool to reduce lookup depth.
  • Wrong host field: Use @ for the root domain. Using www or leaving it blank creates the record in the wrong place.

How to Verify

  • Wait 15–60 minutes for DNS propagation after adding the record
  • Use MXToolbox SPF Lookup: enter your domain and confirm it shows include:spf.protection.outlook.com as authorized
  • Send a test email to a Gmail address and check the headers: look for spf=pass in the Authentication-Results header
  • In the Microsoft 365 Admin Center: Settings → Domains → your domain → DNS records — Microsoft will show a warning if SPF is not detected

After SPF passes, set up DKIM (Microsoft 365 Admin Center → Security → Email Authentication → DKIM → enable and publish CNAME records), then DMARC. All three together are required for Microsoft 365 inbox placement reliability in 2025.

MailPilot

Ready to reach the inbox every time?

Automated email warmup across 8,400+ real mailboxes. Live inbox placement monitoring. Free 14-day trial - no credit card required.

Start free trial
More from the blog
Why Your Cold Email Hits Spam (And How to Fix It in 48 Hours)
5 min read
The 30-Day Email Warmup Schedule That Actually Works
7 min read
SPF, DKIM, DMARC: The Three Records Every Email Sender Must Set Up
4 min read
Does Email Warmup Actually Work? (Data from 50,000 Accounts)
6 min read
Best Email Warmup Tools in 2025: Lemwarm vs Warmy vs Mailreach vs MailPilot
9 min read
How Long Does It Take to Warm Up an Email Account?
5 min read
Mailbox Warmup vs Domain Warmup: What's the Difference?
4 min read
How Spam Filters Work in 2025 (And How to Beat Them Legitimately)
7 min read
How to Set Up SPF Record for Google Workspace (Step-by-Step 2025)
3 min read
How to Add an SPF Record in Namecheap (2025 Guide)
3 min read
How to Add an SPF Record in GoDaddy (2025 Guide)
3 min read
Google Postmaster Tools: How to Read and Act on Your Gmail Sender Reputation
6 min read
How to Improve Email Sender Reputation: From Damaged to Trusted
6 min read
Cold Email Reply Rate Benchmarks: What's Good in 2025?
5 min read
The Top Email Blacklists and How to Get Removed Fast
5 min read
What Is Email Warmup? A Complete Beginner's Guide
5 min read
Free Email Warmup Tools: What's Actually Free in 2025?
5 min read
Gmail Sender Requirements 2025: What Changed and How to Comply
5 min read
What Are Spam Traps? How They Work and How to Avoid Them
5 min read
LemWarm Review 2025: Is It Worth It?
6 min read
Warmy.io Review 2025: Big Claims, Real Results?
6 min read
MailReach Review 2025: Honest Results After 30 Days
6 min read
Folderly Review 2025: Is It Worth the Premium Price?
6 min read
Email Deliverability Best Practices: The Complete 2025 Guide
10 min read
What Is an SPF Record? (And Why Every Email Sender Needs One)
5 min read
Best Email Provider for Cold Email in 2025
7 min read
Email Templates That Hurt Deliverability (And What to Use Instead)
6 min read

Join the waitlist and lock in founding-member pricing.

Join the waitlistBook a demo

Join the waitlist and lock in founding-member pricing.

Join the waitlistBook a demo