How to Fix SPF, DKIM, and DMARC DNS Entries in Microsoft 365
Question details
The user needs to correct Microsoft 365 email authentication warnings by properly configuring SPF, DKIM, and DMARC DNS records.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Configuring domain DNS records to authenticate emails and prevent spam or spoofing warnings.
- Observed behavior
- Email authentication warnings are triggered due to missing or incorrect DKIM selector records and DMARC configurations.
Ensure you have administrator access to the Microsoft 365 Defender portal and the DNS management console of your domain hosting provider.
Configure DKIM CNAME Records in DNS
Create and publish the exact CNAME records for selector1 and selector2 provided by Microsoft 365 to enable DKIM authentication.
DKIM adds a cryptographic signature to your emails. Microsoft 365 requires you to publish two specific CNAME records in your domain's DNS settings before DKIM can be activated.
Log in to the Microsoft 365 Defender portal, then navigate to Policies & rules > Threat policies > Email authentication settings > DKIM.
Select your domain from the list. The panel will display the exact host names and target values for selector1 and selector2. Copy these values to your clipboard.
Open your domain provider's DNS management page (e.g., GoDaddy, Cloudflare) and create two new CNAME records. Paste the copied host names and target values exactly as they appeared.
Return to the Microsoft 365 Defender portal, wait for DNS propagation to complete, and toggle the switch to 'Enable' DKIM for your domain.

Verify SPF and DMARC Configurations
Ensure your SPF record correctly authorizes Microsoft 365 to send emails and that your DMARC record enforces your organization's email policy.
Looking for a Lightweight and Free Office Suite?
While managing Microsoft 365 requires complex DNS and administrative setups for enterprise email, creating documents shouldn't be difficult. If you only need powerful word processing, spreadsheets, and presentation tools without the expensive enterprise overhead, WPS Office is the perfect free alternative. It offers a familiar interface, seamless migration, and high compatibility with Microsoft Office formats.
- 1. Download the Installer: Visit the official WPS Office website and download the installation file for your operating system.
- 2. Install WPS Office: Run the installer and follow the simple on-screen instructions to set up the lightweight office suite.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Word, Excel, or PowerPoint files with zero formatting loss.

Frequently Asked Questions
How long does it take for Microsoft 365 to recognize my new DKIM and DMARC DNS records?
DNS changes typically propagate within a few hours, but it can take up to 48 hours for Microsoft 365 to fully recognize and validate the new CNAME, SPF, or DMARC records globally.
Why am I getting an error when attempting to enable DKIM in Microsoft 365 Defender?
This usually happens if the CNAME records for selector1 and selector2 are not published correctly in your DNS, or if DNS propagation is still incomplete. Verify that you copied the host names and target values exactly as provided by Microsoft without manually substituting any characters.
Can I use multiple SPF records for a single domain to authorize different email providers?
No, a domain can only have one SPF TXT record. If you use multiple email services, you must merge their SPF includes into a single record (for example: `v=spf1 include:spf.protection.outlook.com include:thirdparty.com -all`).
What happens if I don't configure DMARC for my Microsoft 365 domain?
Without DMARC, your domain is more susceptible to email spoofing and phishing attacks. Additionally, strict email service providers like Gmail and Yahoo may flag your outgoing Microsoft 365 emails as spam or reject them entirely.




