SPF Records And Office 365: How To Ensure
Your Emails Are Properly Authenticated
Ensuring email authentication is crucial for companies to safeguard against phishing scams, email impersonation, and issues related to deliverability. One of the most prevalent protocols for authentication is the Sender Policy Framework (SPF), which confirms that emails dispatched from a specific domain are approved by the domain's owner. For organizations utilizing Microsoft Office 365 for their email services, it’s vital to configure SPF records accurately to guarantee that emails are authenticated correctly and delivered to recipients’ inboxes instead of being categorized as spam or rejected.
This guide will delve into the functioning of SPF records, the steps to set them up for Office 365, and the best practices to enhance email authentication within your organization.
Understanding SPF Records
What Is an SPF Record?
An SPF (Sender Policy Framework) record is a DNS (Domain Name System) entry that designates the mail servers allowed to send messages for your domain. This mechanism assists email providers in confirming that emails arriving from a specific domain originate from a legitimate server, thereby minimizing the chances of email spoofing.

How SPF Works
Upon receiving an email, the recipient's mail server reviews the SPF record of the sender's domain. It assesses whether the IP address of the sending server aligns with the authorized sender list outlined in the SPF record. Depending on this assessment, the receiving server has the option to either accept, reject, or flag the email as potentially harmful. Click the link to find out more.
Configuring SPF Records for Office 365
Step 1: Identify Your SPF Record Requirements
As Office 365 is responsible for managing email dispatch for your domain, it's essential to set up an SPF record that incorporates the mail servers authorized by Microsoft. Microsoft offers a specific SPF record that encompasses all the required mail servers for Office 365:
v=spf1 include:spf.protection.outlook.com -all
Step 2: Adding the SPF Record to Your DNS
- Access Your DNS Configuration: Sign into your domain registrar or DNS service provider, such as GoDaddy, Cloudflare, or Namecheap.
- Find the DNS Records Area: Navigate to the section where you can modify or add TXT records.
- Add a New TXT Record:
- Name/Host: Enter @ or your domain name (for example, example.com).
- Record Type: Select TXT.
- Value: Input v=spf1 include:spf.protection.outlook.com -all.
- TTL: Keep it at the default setting, which is typically 3600 seconds (or 1 hour).
- Save Changes: After entering the information, save your updates and wait for the changes to propagate, which may take several hours.
Step 3: Verifying Your SPF Record
Once you have updated your DNS records, make sure to check your SPF settings by utilizing online resources like:
- MXToolbox SPF Checker (https://mxtoolbox.com/spf.aspx)
- Microsoft’s Remote Connectivity Analyzer (https://testconnectivity.microsoft.com/)

Best Practices for SPF and Office 365
Avoid Multiple SPF Records
Ensure that your domain contains just one SPF record. If you must incorporate various email services, like a third-party marketing platform, merge them into a single SPF record. For example:
v=spf1 include:spf.protection.outlook.com include:thirdparty.com -all
Use the Correct SPF Mechanism
The -all directive after the SPF record enforces a strict policy, instructing recipient servers to deny emails from unauthorized sources. If you're working on resolving email delivery problems, you might consider using ~all (soft fail) as a temporary measure instead:
v=spf1 include:spf.protection.outlook.com ~all
Monitor SPF Performance
SPF records can only accommodate a maximum of 10 DNS queries. Surpassing this limit could lead to issues with the functionality of your SPF record. To assess the complexity of your SPF setup, consider utilizing tools such as dmarcian SPF Surveyor.
Implement DMARC and DKIM
Although SPF is useful for verifying emails, its effectiveness is significantly increased when used together with DKIM (DomainKeys Identified Mail) and DMARC (Domain-based Message Authentication, Reporting, and Conformance). For better email authentication, ensure that you set up these records in conjunction with SPF.