This article walks you through the step-by-step setup of SPF and DKIM for Outlook (Microsoft 365).
SPF tells receiving email servers which mail servers are allowed to send emails on behalf of your domain.
Examples: GoDaddy, Namecheap, Cloudflare, etc.
You need to add the following TXT record:
Type | Name/Host | Value |
---|---|---|
TXT | @ or yourdomain.com | v=spf1 include:spf.protection.outlook.com -all |
🔍 If you already have an SPF record, merge Microsoft’s include:
E.g.,v=spf1 include:spf.protection.outlook.com include:_spf.google.com -all
Save the record.
It may take up to 24-48 hours to propagate.
DKIM signs outgoing messages with a private key. The recipient’s server uses a public key (published in your DNS) to verify the message integrity and source.
Go to: https://admin.microsoft.com
You need Global Administrator permissions.
Go to: Microsoft Defender > Email & Collaboration > Policies & Rules > Threat Policies > DKIM
Shortcut: https://security.microsoft.com/dkimv2
Click on your domain from the list.
Microsoft will show you two CNAME records to publish:
Example:
selector1._domainkey.yourdomain.com → selector1-yourdomain-com._domainkey.yourinitialdomain.onmicrosoft.com
selector2._domainkey.yourdomain.com → selector2-yourdomain-com._domainkey.yourinitialdomain.onmicrosoft.com
In your DNS provider’s portal, add:
Type | Name | Value |
---|---|---|
CNAME | selector1._domainkey | selector1-yourdomain-com._domainkey.yourtenant.onmicrosoft.com |
CNAME | selector2._domainkey | selector2-yourdomain-com._domainkey.yourtenant.onmicrosoft.com |
Note: Replace
yourdomain-com
andyourtenant
with actual values shown in Defender.
After DNS records propagate (1–48 hours), go back to Microsoft Defender DKIM settings:
Click on your domain
Click “Enable”
You can test SPF, DKIM, and DMARC using TDMARC tool feature Email Analyzer by dropping an email on the respective email ID
Setting up SPF and DKIM for Outlook (Microsoft 365) is essential for protecting your domain and improving email deliverability. This guide ensures you're authenticated and ready to combat spoofing and phishing.