logo
search
Security Policy Errors

How to Fix SPF, DKIM, and DMARC DNS Entries in Microsoft 365

Algirdas JasaitisAlgirdas Jasaitis Oct 14, 2026 870 views

Question details

The user needs to correct Microsoft 365 email authentication warnings by properly configuring SPF, DKIM, and DMARC DNS records.

How to Fix SPF, DKIM, and DMARC DNS Entries in Microsoft 365
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.
Before you start

Ensure you have administrator access to the Microsoft 365 Defender portal and the DNS management console of your domain hosting provider.

Solution 1Recommended

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.

1
Access Email Authentication Settings

Log in to the Microsoft 365 Defender portal, then navigate to Policies & rules > Threat policies > Email authentication settings > DKIM.

2
Copy DKIM Values

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.

3
Publish CNAME Records

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.

4
Enable DKIM in Microsoft 365

Return to the Microsoft 365 Defender portal, wait for DNS propagation to complete, and toggle the switch to 'Enable' DKIM for your domain.

Configure DKIM CNAME Records in DNS
Important Configuration Note: Do not substitute or invent values manually. You must use the exact host names and target values shown in the Microsoft 365 Defender or Exchange Online configuration page.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the installation file for your operating system.
  2. 2. Install WPS Office: Run the installer and follow the simple on-screen instructions to set up the lightweight office suite.
  3. 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Word, Excel, or PowerPoint files with zero formatting loss.
Completely free core office features including Writer, Spreadsheet, and Presentation.Fully compatible with standard Microsoft Office document formats (.docx, .xlsx, .pptx).Unlike managing complex Microsoft 365 admin policies, WPS Office requires zero technical configuration to get started.Lightweight application that runs smoothly across Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

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.