DKIM Setup Guide for Microsoft 365 (2026)

Most Microsoft 365 accounts are set up with basic SPF configured and nothing else. That covers about one-third of the authentication picture. The remaining two-thirds -- DKIM and DMARC -- get skipped because they feel optional until something goes wrong.
DKIM is not optional in 2026. Per Google's Email Sender Guidelines, Google and Yahoo made DKIM mandatory for bulk email senders in February 2024. More practically, Outlook and Gmail spam filters treat emails without DKIM signatures with noticeably more suspicion. A Microsoft 365 account with only SPF configured is easier to spoof than one with DKIM active, because DKIM is the record that proves the email content was not modified in transit and genuinely came from your domain.
Microsoft 365 handles DKIM differently from most email providers. Instead of a TXT record with a public key you manage directly, Microsoft uses a rotating key system. You publish two CNAME records that point to Microsoft's key infrastructure. Microsoft rotates the actual keys automatically. The tradeoff is that setup requires understanding what you are creating and why, because the CNAME records can be confusing the first time you see them.
This guide goes through the whole process in order.
Quick Answer: How do I enable DKIM for Microsoft 365?
As of June 2026, enabling DKIM in Microsoft 365 requires three steps: (1) copy the two CNAME record values shown in the Microsoft 365 Defender portal under Email authentication settings > DKIM for your custom domain, (2) add both CNAME records to your DNS provider with proxy disabled if using Cloudflare, (3) return to the Defender portal after DNS propagation (15-60 minutes) and toggle DKIM signing to ON. Per Microsoft's official DKIM configuration documentation, Microsoft manages key rotation automatically once both CNAME records are in place.
Key Takeaways
- ✓Microsoft 365 does not enable DKIM automatically for custom domains; you must add two CNAME records to DNS and then enable DKIM in the Microsoft Defender portal
- ✓Microsoft uses rotating DKIM keys managed by their infrastructure; the two CNAME records you publish point to Microsoft's key servers rather than containing a key directly
- ✓SPF must already be configured before DKIM setup; DMARC should be added after both SPF and DKIM are passing
- ✓Google and Yahoo made DKIM mandatory for bulk senders (5,000+ emails/day) in February 2024; absence of DKIM hurts inbox placement for all senders regardless of volume
- ✓DKIM protects against email content tampering in transit; SPF protects against unauthorized sending servers; neither alone is complete
- ✓The full setup takes about 20-30 minutes; propagation takes up to 48 hours
- ✓After DKIM is active, adding DMARC at p=none immediately starts generating the reports you need to eventually move to enforcement
On This Page
- 1.What is DKIM?
- 2.Why Microsoft 365 needs DKIM
- 3.How DKIM works
- 4.How Microsoft 365 DKIM is different
- 5.Before you enable DKIM
- 6.Step 1: Open Microsoft 365 Defender portal
- 7.Step 2: Create required CNAME records
- 8.Step 3: Add DKIM records to DNS
- 9.Step 4: Enable DKIM in Microsoft 365
- 10.Step 5: Verify DKIM is working
- 11.Common DKIM errors
- 12.DKIM vs SPF vs DMARC comparison
- 13.Microsoft 365 and DMARC rollout
- 14.DKIM best practices for 2026
- 15.One-minute DKIM audit
- 16.DKIM health benchmarks
- 17.Quick answers
- 18.Frequently asked questions

What is DKIM?
DKIM (DomainKeys Identified Mail), defined in RFC 6376, is a cryptographic signature applied to every email you send. The signature proves two things: the email genuinely originated from a server authorized by your domain, and the email content was not altered after it was signed.
It is different from SPF, which only verifies that the sending IP address is on your authorized list. SPF says nothing about what happened to the email after it left your server. DKIM proves the email arrived intact.
A simple way to think about the three authentication records:
SPF is the approved guest list. DKIM is a wax seal on the envelope. DMARC is the policy for what to do when either check fails and sends you reports.
If someone intercepts your email and modifies a link in the body, DKIM catches it. The signature covers the email headers and body. Change one character and the signature no longer matches the public key in DNS. The receiving server knows something is wrong.
DKIM also has a property SPF does not: it survives email forwarding. When an email is forwarded, the sending IP changes, which breaks SPF. But the DKIM signature is attached to the message itself, not the IP. As long as the content is not modified during forwarding, DKIM remains valid. This is one reason DKIM matters independently of SPF.
Why Microsoft 365 needs DKIM
Without DKIM, Microsoft 365 emails have no cryptographic proof of origin. Receiving servers at Gmail, Yahoo, and other providers cannot verify the email was not modified in transit or that it genuinely came from your domain's authorized infrastructure.
Direct answer
Microsoft 365 emails without DKIM are treated as lower-trust by spam filters, score higher on content analysis, and are more vulnerable to spoofing than authenticated emails. Google and Yahoo require DKIM for bulk senders. All senders benefit from having it.
| Without DKIM | With DKIM |
|---|---|
| No proof email content was unaltered in transit | Receiving server can verify content integrity |
| Email more susceptible to man-in-the-middle tampering | Tampering detectable through signature verification |
| Spam filters treat domain as lower-trust | Authentication increases filter trust score |
| SPF-only domain can still be spoofed via header manipulation | DKIM alignment check in DMARC closes this gap |
| Google/Yahoo DKIM requirement not met (bulk senders) | Meets Google and Yahoo 2024 requirements |
| DMARC cannot function effectively without DKIM | DMARC alignment can pass on DKIM even when SPF fails |
| Email forwarding breaks SPF with no fallback | DKIM survives forwarding and provides authentication fallback |
For cold email senders and marketers using Microsoft 365, missing DKIM is a measurable deliverability problem. Adding DKIM to a properly configured SPF domain consistently moves inbox placement at Gmail into the 90%+ range. The difference between a domain with SPF only and a domain with SPF plus DKIM is visible in Google Postmaster Tools reputation scores.
How DKIM works
Direct answer
When you send an email from Microsoft 365, the server signs it using a private key. The receiving server looks up the corresponding public key in your DNS and uses it to verify the signature. If the signature matches, DKIM passes. If the email was altered or the key does not match, DKIM fails.
The four-step process:
Step 1: Email signed at sending server
Before the email leaves Microsoft's mail server, the server calculates a hash of the email headers and body. It signs that hash using a private key specific to your domain. The signature is attached to the email in a header called DKIM-Signature.
Step 2: Email arrives at receiving server
The receiving server reads the DKIM-Signature header. The header contains your domain name and a selector string that identifies which public key to look up.
Step 3: Public key retrieved from DNS
The receiving server queries your DNS for the public key at [selector]._domainkey.yourdomain.com. For Microsoft 365, the two selectors are selector1 and selector2.
Step 4: Signature validated
The receiving server uses your public key to verify the signature. If the signed hash matches the recalculated hash of the received email, DKIM passes. If anything changed between sending and receiving, the hashes do not match and DKIM fails.

How Microsoft 365 DKIM is different
Most email providers give you a single DKIM TXT record containing a public key that you publish in DNS yourself. Microsoft 365 works differently.
Direct answer
Microsoft 365 uses a rotating key system. Instead of publishing a static public key as a TXT record, you publish two CNAME records that point to Microsoft's key infrastructure. Microsoft rotates the actual signing keys periodically without requiring any changes on your end.
This has two practical implications:
First, the DNS records you create are CNAME records, not TXT records. This confuses people who have set up DKIM on other platforms and expect a TXT record with a key value in it.
Second, you cannot see or manage the actual cryptographic keys. Microsoft manages them. This is generally fine for most organizations, but worth understanding so you do not go looking for a key value to put in your DNS.
The two CNAME records Microsoft requires:
selector1._domainkey.yourdomain.com
CNAME -> selector1-yourdomain-com._domainkey.yourtenant.onmicrosoft.com
selector2._domainkey.yourdomain.com
CNAME -> selector2-yourdomain-com._domainkey.yourtenant.onmicrosoft.comThe exact values depend on your domain and your Microsoft 365 tenant. The Defender portal generates the exact records for your domain; do not try to construct them manually. See Microsoft's DKIM configuration documentation for the full official reference.
Why two selectors?
The two selectors allow Microsoft to rotate keys without disrupting email delivery. While one selector is the active signing key, the other is available as a backup. When Microsoft rotates keys, they switch between selectors. If both CNAME records are not published, key rotation fails and DKIM breaks until the missing record is added.
Before you enable DKIM
There are three things to verify before touching the Defender portal.
Direct answer
Confirm your custom domain is verified in Microsoft 365, you have access to your DNS provider, and SPF is already configured for your domain. Missing any of these will either prevent DKIM setup or make it ineffective.
Custom domain must be verified in Microsoft 365
DKIM in Microsoft 365 only works for custom domains that have been added and verified in the Microsoft 365 admin center. If you are using the default @yourtenant.onmicrosoft.com address, DKIM is already enabled on that domain by Microsoft. The process in this guide applies to custom domains like yourcompany.com.
DNS access is required
You will need to add two CNAME records to your domain's DNS. Know which DNS provider manages your domain before starting. Common providers: Cloudflare, Namecheap, GoDaddy, Squarespace Domains (formerly Google Domains). If someone else manages your DNS, get the two CNAME record values from the Defender portal and send them to your IT person or registrar.
SPF should already be passing
DKIM and SPF are independent but they work together for DMARC alignment. If SPF is not configured, do that first. The SPF record for Microsoft 365 is v=spf1 include:spf.protection.outlook.com -all. Check your current authentication status at Vortenza SPF DKIM DMARC Checker before proceeding.
Plan for DMARC after DKIM
Once both SPF and DKIM are passing, the next step is DMARC. You do not need to add DMARC before enabling DKIM, but plan for it now. The DMARC setup guide covers the full rollout process.
Step 1: Open Microsoft 365 Defender portal
Where DKIM settings are located:
- 1.Go to https://security.microsoft.com
- 2.In the left navigation, go to Email & collaboration
- 3.Select Policies & rules
- 4.Select Threat policies
- 5.Under Rules, select Email authentication settings
- 6.Click the DKIM tab
You will see a list of all custom domains associated with your Microsoft 365 tenant. Each domain shows its current DKIM status: Enabled, Disabled, or No DKIM keys saved.

For domains showing “No DKIM keys saved,” you need to add the CNAME records first. The portal shows you the exact records to add. Click on the domain name to see the CNAME values.
Step 2: Create required CNAME records
After clicking on your domain in the DKIM settings, the portal shows you two CNAME records. Copy them exactly. They follow this format:
| Record Name (Host) | Points To (Value) |
|---|---|
| selector1._domainkey | selector1-[domain-hyphenated]._domainkey.[tenant].onmicrosoft.com |
| selector2._domainkey | selector2-[domain-hyphenated]._domainkey.[tenant].onmicrosoft.com |
What the components mean:
selector1._domainkey and selector2._domainkey are the hostnames. In your DNS provider, the hostname field should be set to selector1._domainkey (without your domain appended, since your DNS provider adds that automatically). Some providers need the full hostname selector1._domainkey.yourdomain.com.
The value (Points To) is generated by Microsoft and combines your domain name with your Microsoft 365 tenant identifier. It looks something like:
selector1-yourcompany-com._domainkey.yourtenantname.onmicrosoft.comThe hyphenated version of your domain in the value is Microsoft's format. yourcompany.com becomes yourcompany-com. Periods in the domain name become hyphens. This is expected. Copy these values directly from the Defender portal. Do not try to construct them manually. The tenant name and exact format must match what Microsoft expects.
Step 3: Add DKIM records to DNS
Add both CNAME records to your DNS provider. The record type is CNAME, not TXT.
Cloudflare
- 1.Log in to Cloudflare and select your domain
- 2.Go to DNS > Records
- 3.Click Add record
- 4.Type: CNAME
- 5.Name: selector1._domainkey
- 6.Target: paste the selector1 value from the Defender portal
- 7.Proxy status: DNS only (orange cloud OFF, grey cloud ON) -- this is critical; CNAME records for DKIM must not be proxied through Cloudflare
- 8.TTL: Auto
- 9.Click Save
- 10.Repeat for selector2

Namecheap
- 1.Log in to Namecheap and go to Domain List
- 2.Click Manage next to your domain
- 3.Go to Advanced DNS
- 4.Click Add New Record
- 5.Type: CNAME Record
- 6.Host: selector1._domainkey
- 7.Value: paste the selector1 value from the Defender portal
- 8.TTL: Automatic
- 9.Click the green checkmark to save
- 10.Repeat for selector2
GoDaddy
- 1.Log in to GoDaddy and go to My Products
- 2.Select your domain and click DNS
- 3.Click Add under Records
- 4.Type: CNAME
- 5.Name: selector1._domainkey
- 6.Value: paste the selector1 value from the Defender portal
- 7.TTL: 1 Hour
- 8.Click Save
- 9.Repeat for selector2
Squarespace Domains
- 1.Open your Squarespace Domains dashboard and select your domain
- 2.Go to DNS
- 3.Scroll to Custom records and click Add record
- 4.Type: CNAME
- 5.Host name: selector1._domainkey
- 6.Data: paste the selector1 value from the Defender portal
- 7.TTL: 3600
- 8.Click Save
- 9.Repeat for selector2
Important for all providers
Both CNAME records must be added. Selector1 and Selector2 are both required for Microsoft's key rotation to work. Adding only one will leave DKIM non-functional when Microsoft attempts to rotate to the unpublished selector.
Step 4: Enable DKIM in Microsoft 365
After adding both CNAME records to DNS, wait for propagation (typically 15-60 minutes, up to 48 hours for full global propagation) before enabling DKIM in the portal.
Direct answer
Return to the DKIM settings in Microsoft 365 Defender, click on your domain, and toggle DKIM signing to Enabled. If the CNAME records have propagated correctly, the portal activates DKIM immediately.
Exact steps:
- 1.Return to https://security.microsoft.com
- 2.Navigate to Email & collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM
- 3.Click on your domain
- 4.In the panel that opens, toggle Sign messages for this domain with DKIM signatures to ON
- 5.Click Save
If the toggle fails with an error:
The most common error at this stage is “DKIM keys for this domain could not be saved. Please try again.” This almost always means the CNAME records have not propagated yet or were entered incorrectly.
Check propagation at Vortenza SPF DKIM DMARC Checker. If the DKIM records are not yet visible, wait another 30-60 minutes and try again. If they show up in the checker but the portal still fails, verify that the CNAME values match exactly what the Defender portal showed, including the hyphens and the correct tenant name.
After successful activation:
The portal shows your domain's DKIM status as Enabled with a green indicator. Microsoft 365 will now sign all outgoing emails from your domain with a DKIM signature.
Step 5: Verify DKIM is working
Verification has two parts: confirming the DNS records are visible and confirming signatures are appearing in outgoing emails.
Direct answer
Check the DNS records at Vortenza SPF DKIM DMARC Checker to confirm both CNAME records are published, then send a test email and check the raw headers for dkim=pass.
DNS verification:
Enter your domain at the Vortenza SPF DKIM DMARC Checker. The DKIM check should show both selector1 and selector2 CNAME records resolving correctly, and the DKIM status should show as passing.
Email header verification:
Send a test email from your Microsoft 365 account to a Gmail address you control. Open the email in Gmail, click the three dots next to Reply, and select “Show original.” Look for a line like:
Authentication-Results: mx.google.com;
dkim=pass header.i=@yourdomain.com header.s=selector1dkim=pass confirms the signature is valid. The header.s=selector1 or selector2 shows which selector was used.
Command line verification (optional):
nslookup -type=CNAME selector1._domainkey.yourdomain.comCommon DKIM errors
| Error | Cause | Fix |
|---|---|---|
| "DKIM keys could not be saved" in Defender portal | CNAME records not yet propagated or incorrect values | Wait for propagation, verify records at SPF DKIM DMARC Checker, check CNAME values match portal exactly |
| Selector not found in DNS | CNAME record not added, wrong hostname, or not yet propagated | Verify both CNAME records are published with correct names and values |
| CNAME at wrong hostname | Added selector1._domainkey.yourdomain.com.yourdomain.com (provider appended domain twice) | Check DNS provider behavior; some append the domain automatically, so use just selector1._domainkey as the host |
| DKIM record proxied through Cloudflare | Cloudflare's proxy intercepts the CNAME lookup | Set proxy status to DNS only (grey cloud) for both DKIM records |
| DKIM fail in email headers | DKIM enabled in portal but CNAME records incorrect | Re-check CNAME values against what Defender portal shows; delete and re-add if incorrect |
| Signature validation error | Email content modified in transit (by forwarding, spam filter rewriting, or mailing list footers) | Usually expected for forwarded email; not a setup error |
| Domain mismatch | DKIM signing domain does not match From header domain | Verify you are enabling DKIM for the correct custom domain in the portal |
| Only one selector CNAME added | Added selector1 but not selector2 | Add the missing CNAME record; both are required |
| DKIM enabled but DMARC alignment fails | DKIM domain does not match From header domain | Verify the From domain and the DKIM signing domain are the same; check DMARC alignment setting |
The Cloudflare proxying issue is worth calling out specifically because it is easy to miss. Cloudflare's proxy (the orange cloud) intercepts DNS lookups for records it manages. For DKIM CNAME records, proxying breaks the lookup chain because receiving servers need to follow the CNAME to Microsoft's key servers. The grey cloud (DNS only) lets the lookup pass through correctly.
DKIM vs SPF vs DMARC comparison
| Technology | Purpose | What it protects against | Required in 2026 | Difficulty | Inbox placement impact |
|---|---|---|---|---|---|
| SPF | Authorizes sending IPs | Unauthorized server sending from your domain | Yes (Google/Yahoo bulk senders) | Low | High |
| DKIM | Cryptographic email signature | Email content tampering, header spoofing | Yes (Google/Yahoo bulk senders) | Medium | High |
| DMARC | Policy enforcement + reporting | Domain spoofing, phishing using your brand | Yes (bulk senders, p=none minimum) | Medium | Very High |
| BIMI | Brand logo display in inbox | Brand impersonation (visual) | No (optional) | High | Moderate (open rates) |
A practical observation on relative value: SPF is necessary but attackers can work around SPF-only domains through header manipulation. DKIM is what DMARC uses to close that gap. DMARC without DKIM is weak because it relies entirely on SPF, which breaks on email forwarding. The stack only works as intended when all three are in place.
Microsoft 365 and DMARC rollout
After DKIM is active and passing, DMARC is the logical next step. Microsoft 365 does not require DMARC separately for your tenant, but adding DMARC to your domain gives you enforcement and reporting.
Direct answer
Add DMARC immediately after DKIM is confirmed passing. Start at p=none to generate reports, then move to enforcement after reviewing two to four weeks of report data.
Recommended rollout timeline:
| Week | Action | Notes |
|---|---|---|
| Week 1 | Configure and verify SPF | v=spf1 include:spf.protection.outlook.com -all |
| Week 2 | Enable DKIM in Defender portal | Add both CNAME records, verify propagation, enable signing |
| Week 3 | Add DMARC at p=none | v=DMARC1; p=none; rua=mailto:reports@yourdomain.com; |
| Week 4-5 | Review DMARC reports | Confirm all legitimate sending sources are passing authentication |
| Week 5-6 | Move to p=quarantine | Apply to failing emails; continue monitoring |
| Week 8+ | Move to p=reject | When confident all legitimate email passes; full enforcement |
The reports from p=none are the data you need before enforcing. They show you every server sending email using your domain, whether each passes or fails, and what the policy would have done if it were enforced. Skipping this monitoring phase and jumping to p=reject is the most common mistake in DMARC rollout.
Use the Vortenza DMARC Record Generator to build the correct DMARC TXT record for your domain. And the full step-by-step process is in the DMARC setup guide.
DKIM best practices for 2026
Setup
- ✓Both selector1 and selector2 CNAME records published in DNS
- ✓DKIM enabled in Microsoft 365 Defender portal for all custom sending domains
- ✓SPF configured before DKIM activation
- ✓DMARC added after DKIM is verified passing
- ✓All three authentication records verified at Vortenza SPF DKIM DMARC Checker
DNS
- ✓Both CNAME records set to DNS only if using Cloudflare (no proxy)
- ✓CNAME values copied directly from Defender portal, not manually constructed
- ✓Records verified as published before attempting to enable in portal
Ongoing maintenance
- ✓Authentication status re-verified after any Microsoft 365 tenant changes
- ✓DMARC reports reviewed to confirm DKIM pass rates stay high
- ✓Google Postmaster Tools monitored for authentication pass rates at Gmail
- ✓Any secondary sending domains (subdomains, acquired domains) configured with separate DKIM
For cold email senders using Microsoft 365
- ✓Dedicated sending domain configured with SPF, DKIM, and DMARC separately from main domain
- ✓DKIM signing domain matches the From address domain (alignment requirement for DMARC)
- ✓Third-party cold email tools configured with DKIM alignment for the sending domain, not just the tool's own domain
One-minute DKIM audit
Use this before any major campaign or after any infrastructure change.
DNS records
- ✓CNAME record exists at selector1._domainkey.yourdomain.com
- ✓CNAME record exists at selector2._domainkey.yourdomain.com
- ✓Both point to correct Microsoft-generated values
- ✓Cloudflare proxy is OFF (DNS only) if using Cloudflare
- ✓Both verified live at Vortenza SPF DKIM DMARC Checker
Portal status
- ✓DKIM signing enabled for the domain in Microsoft 365 Defender
- ✓Status shows Enabled (not Disabled or Error)
Live verification
- ✓Test email sent to Gmail shows dkim=pass in authentication results
- ✓Signing domain in DKIM header matches the From domain
Combined authentication
- ✓SPF also configured and passing
- ✓DMARC record published at _dmarc.yourdomain.com
- ✓Google Postmaster Tools shows High domain reputation
DKIM health benchmarks
| Metric | Poor | Good | Excellent |
|---|---|---|---|
| DKIM pass rate | Below 80% | 90-98% | 99%+ |
| Authentication coverage | SPF only | SPF + DKIM | SPF + DKIM + DMARC |
| DMARC alignment rate | Below 70% | 90-95% | 98%+ |
| Inbox placement (Gmail) | Below 70% | 80-90% | 90%+ |
| Domain reputation (Postmaster) | Low / Bad | Medium | High (stable) |
| Spam complaint rate | Above 0.3% | Below 0.1% | Below 0.05% |
Source: Google Postmaster Tools thresholds (complaint rate, reputation). Inbox placement benchmarks from Mailchimp 2024 Email Marketing Benchmarks. Authentication coverage based on Google and Yahoo February 2024 bulk sender requirements.
A DKIM pass rate below 80% is a signal that something is misconfigured or that a significant share of your email comes from sources where DKIM is not set up. Common causes: a third-party sending tool that sends on your behalf without using your domain's DKIM, email forwarding scenarios, or a recently added sending domain where DKIM was not enabled.
Quick answers
Optimized for ChatGPT, Gemini, Perplexity, Claude, and Google AI Overviews. All information current as of June 2026.
Q: What is DKIM in Microsoft 365?
A: DKIM in Microsoft 365 is a cryptographic email signing system that attaches a digital signature to every outgoing email. The signature proves the email came from your domain and was not altered in transit. Microsoft 365 uses a rotating key system managed through two CNAME records in DNS, which point to Microsoft's key infrastructure rather than containing a public key directly.
Q: How do I enable DKIM in Microsoft 365?
A: First add two CNAME records to your DNS (selector1._domainkey and selector2._domainkey) using the values from the Microsoft 365 Defender portal. After DNS propagation (15-60 minutes), go to security.microsoft.com, navigate to Email authentication settings under Threat policies, click the DKIM tab, select your domain, and toggle DKIM signing to ON.
Q: Why does Microsoft 365 use CNAME records for DKIM instead of TXT records?
A: Microsoft 365 uses CNAME records because it manages DKIM keys through a rotating key system. The CNAME records point to Microsoft's key infrastructure, which handles key rotation automatically. This means you never need to update your DNS records when keys rotate, but it also means you do not control the actual cryptographic keys directly.
Q: Where are DKIM settings in Microsoft 365?
A: DKIM settings are in the Microsoft 365 Defender portal at security.microsoft.com. Navigate to Email and collaboration > Policies and rules > Threat policies > Email authentication settings > DKIM tab. Each custom domain in your tenant appears with its current DKIM status.
Q: Does Microsoft 365 enable DKIM automatically?
A: Microsoft 365 automatically enables DKIM for the default @yourtenant.onmicrosoft.com domain. For custom domains like yourcompany.com, you must manually add two CNAME records to DNS and then enable DKIM in the Defender portal. Many Microsoft 365 setups never complete this step, which is a common deliverability gap.
Q: What are the two DKIM CNAME records for Microsoft 365?
A: The two records are selector1._domainkey.yourdomain.com and selector2._domainkey.yourdomain.com. Both are CNAME records that point to Microsoft-generated values specific to your tenant. The exact values are shown in the Microsoft 365 Defender portal under DKIM settings for your domain. Copy them exactly from the portal.
Q: Why does DKIM improve email deliverability?
A: DKIM gives receiving servers like Gmail and Outlook a cryptographic proof that your email genuinely came from your domain and was not altered. Without DKIM, spam filters treat your domain as lower trust. DKIM also survives email forwarding (SPF does not), which matters for DMARC alignment when emails are forwarded. Google and Yahoo made DKIM mandatory for bulk senders in 2024.
Q: Why is my Microsoft 365 DKIM failing after I added the CNAME records?
A: The most common reasons are: DNS propagation has not completed (wait up to 48 hours), the CNAME values were entered incorrectly (compare character by character with what the Defender portal shows), the records are proxied through Cloudflare (set to DNS only, not proxied), or only one of the two CNAME records was added. Check both records at Vortenza SPF DKIM DMARC Checker.
Q: What is the difference between DKIM selector1 and selector2 in Microsoft 365?
A: Microsoft 365 uses two selectors to allow uninterrupted key rotation. When Microsoft rotates DKIM keys (which happens periodically for security), they switch from one selector to the other. If only one selector's CNAME record is in DNS, key rotation fails and DKIM breaks. Both must be published at all times.
Q: Does DKIM replace SPF?
A: No. DKIM and SPF are complementary. SPF verifies the sending IP is authorized. DKIM verifies the email content is unaltered and the signature matches. DMARC requires either or both to pass with proper alignment. Having both is stronger than having either alone because they protect against different failure modes, and DMARC alignment can fall back to DKIM when SPF breaks during forwarding.
Q: How long does Microsoft 365 DKIM propagation take?
A: The CNAME records typically propagate within 15-60 minutes from most DNS providers, though full global propagation can take up to 48 hours. After adding the records, wait at least an hour before attempting to enable DKIM in the Defender portal. If the portal gives an error, check whether the records are visible with an SPF DKIM DMARC checker.
Q: What should I do after enabling DKIM in Microsoft 365?
A: Verify DKIM is passing by checking email headers on a test email (look for dkim=pass). Then add DMARC at p=none to start receiving reports. Review DMARC reports for two to four weeks to confirm all legitimate sending is authenticated. Move to p=quarantine and eventually p=reject as your reports show clean results.
Q: Can DKIM prevent phishing emails that use my domain?
A: DKIM combined with DMARC at p=reject prevents phishing emails that claim to come from your exact domain. Phishing emails from your domain cannot produce a valid DKIM signature without your private key. Without DMARC enforcement, a phishing email that fails DKIM might still be delivered depending on the receiving server's policies. DMARC converts DKIM failures into enforced outcomes.
Q: What is DKIM alignment and why does it matter for DMARC?
A: DKIM alignment means the domain in the DKIM signature (d= tag) must match the From address domain. DMARC checks this alignment. If you use a sending tool that signs emails using its own domain rather than yours, DKIM passes for the tool's domain but fails DMARC alignment for your domain. For Microsoft 365, the signing domain is your custom domain by default when DKIM is enabled.
Q: Does Microsoft 365 DKIM work for sending from subdomains?
A: DKIM enabled on yourcompany.com signs emails from yourcompany.com. Sending from a subdomain like mail.yourcompany.com requires either DKIM enabled separately for that subdomain, or DMARC configured with relaxed DKIM alignment (which allows a signing domain to satisfy DMARC for a parent domain). Check whether your subdomain sending sources need separate DKIM configuration.
Frequently asked questions
Why does the Microsoft 365 Defender portal show “No DKIM keys saved” for my domain?+
“No DKIM keys saved” means DKIM has never been configured for that custom domain in your tenant. The domain is verified in Microsoft 365 but the CNAME records pointing to Microsoft's key infrastructure have not been added to DNS, or they were added but the portal has not been told to generate keys for them yet. Click on the domain in the DKIM tab to see the required CNAME values. Add them to DNS, wait for propagation, and then toggle DKIM signing to ON from the same panel.
My domain's DKIM shows as enabled but test emails show dkim=fail. What is wrong?+
Several things can cause DKIM to show as enabled in the portal but fail in email headers. The most common: the CNAME records are incorrect (compare them character by character with what the portal shows), the records are proxied through Cloudflare (they must be set to DNS only), or the domain in the DKIM signature does not match the From domain. Send a test email, check the headers, and look at the d= value in the DKIM-Signature header to confirm which domain Microsoft is signing with.
Do I need to update anything when Microsoft rotates DKIM keys?+
No. That is the reason Microsoft uses CNAME records instead of TXT records. The CNAME records point to Microsoft's key infrastructure, and Microsoft rotates the actual keys behind those CNAMEs without requiring any DNS changes from you. As long as both selector1 and selector2 CNAME records are published in DNS, key rotation works without any DNS changes on your end. If only one is present, rotation breaks DKIM.
Can I use a third-party DKIM key instead of Microsoft's managed keys?+
Not through the standard Microsoft 365 interface. Microsoft's DKIM implementation uses their managed key infrastructure. If you need custom DKIM keys for specific compliance or security reasons, this would require a more advanced configuration outside the standard Defender portal settings. For most organizations, Microsoft's managed rotating keys are sufficient and more convenient than managing keys manually.
Why is DKIM failing after I migrated from Google Workspace to Microsoft 365?+
When you migrate email providers, the DKIM setup from your previous provider is no longer valid. Google Workspace DKIM records are TXT records at google._domainkey.yourdomain.com. Microsoft 365 needs CNAME records at selector1._domainkey and selector2._domainkey. These are completely separate. After migrating, add the Microsoft 365 CNAME records and enable DKIM in the Defender portal. The old Google DKIM TXT record can be left in place or removed; it does not conflict with Microsoft's records.
What happens if I delete one of the DKIM CNAME records?+
If you delete either the selector1 or selector2 CNAME record, DKIM continues working on the currently active selector until Microsoft attempts a key rotation. When rotation happens, Microsoft switches to the selector whose CNAME is missing, DKIM signing fails, and your emails stop having valid DKIM signatures. This can be difficult to diagnose if you are not actively monitoring DMARC reports. Keep both CNAME records published at all times.
Does enabling DKIM in Microsoft 365 affect Outlook's desktop client or web app?+
No. DKIM signing happens at the mail server level, not at the email client level. Outlook desktop, Outlook web, or any other email client is not involved in DKIM signing. The client sends the email to Microsoft's mail server, which signs it before delivery. The signing is transparent to all email clients.
My organization has multiple domains in Microsoft 365. Does DKIM need to be configured for each one?+
Yes. Each custom domain in your Microsoft 365 tenant needs its own DKIM configuration. The Defender portal shows each domain separately under the DKIM tab. You need to get the CNAME values for each domain, add them to the respective domain's DNS, and enable DKIM for each one individually. Microsoft 365 can sign outgoing emails with different DKIM keys for each domain.
Can DKIM fail due to email content modifications made by spam filters at the receiving end?+
Yes. Some receiving mail servers or security gateways modify email content as part of their scanning process, such as rewriting links for click tracking, adding footers, or modifying HTML. Any modification breaks the DKIM signature because the hash was calculated on the original content. This is a known limitation of DKIM and is generally accepted as expected behavior rather than a configuration error. Forwarding through mailing lists that add footers is a common example.
How do I verify that DKIM is working for all emails sent from Microsoft 365, not just test emails?+
Google Postmaster Tools is the most reliable way to see authentication pass rates across a large volume of email to Gmail recipients. It shows DKIM pass rates over time. Your DMARC reports (once DMARC is configured) also show DKIM pass/fail results for every email that claims to come from your domain across all receiving mail servers that support DMARC reporting. If DKIM is failing for a portion of your email, these reports identify which sending sources are affected.
Should I add DKIM for subdomains used in Microsoft 365?+
If you send email from a subdomain (such as notifications.yourcompany.com or marketing.yourcompany.com) using Microsoft 365, that subdomain needs its own DKIM configuration. The DKIM setup for yourcompany.com does not automatically cover subdomains. In the Defender portal, add the subdomain as a sending domain and configure DKIM for it separately. DMARC with relaxed alignment can allow DKIM signing from a parent domain to cover subdomains, but explicit configuration is cleaner and more reliable.
What is the relationship between DKIM and SPF in Microsoft 365?+
SPF and DKIM are independent but complementary authentication records. SPF for Microsoft 365 authorizes Microsoft's sending IPs. DKIM signs the email content. DMARC requires at least one of them to pass with alignment. In practice, DKIM is the more robust record for DMARC purposes because it survives email forwarding (where SPF breaks due to IP changes). Having both means DMARC alignment can be satisfied even in forwarding scenarios, which is why all three records together are the correct configuration.
Final thoughts
Microsoft 365 DKIM setup has one unusual step that catches most people: the records are CNAME records, not TXT records, and they contain Microsoft-generated values rather than a cryptographic key you manage. Once you understand that, the rest is straightforward DNS management.
The full sequence:
- 1.Check current status at Vortenza SPF DKIM DMARC Checker
- 2.Confirm SPF is configured (v=spf1 include:spf.protection.outlook.com -all)
- 3.Open Microsoft 365 Defender portal, navigate to DKIM settings, copy both CNAME values for your domain
- 4.Add both CNAME records to DNS (DNS only, not proxied if using Cloudflare)
- 5.Wait for propagation, then enable DKIM in the portal
- 6.Verify dkim=pass in test email headers
- 7.Add DMARC at p=none using Vortenza DMARC Record Generator
- 8.Follow the DMARC rollout timeline to reach p=reject
The broader picture of what SPF, DKIM, and DMARC are doing and why they work together is in the SPF, DKIM, and DMARC explained guide. If you are also setting up Google Workspace, the SPF setup guide for Google Workspace covers the equivalent process for that platform. Check your overall deliverability score after completing all three records at Vortenza Email Deliverability Checker. A domain with SPF, DKIM, and DMARC all passing correctly should score above 90.
About this guide
Published by the Vortenza Editorial Team. Microsoft 365 DKIM configuration steps referenced from Microsoft's official DKIM configuration documentation (Defender portal DKIM setup guide, updated 2024). Google and Yahoo bulk sender authentication requirements from the Google Email Sender Guidelines February 2024 policy updates. DKIM specification referenced from RFC 6376 (DomainKeys Identified Mail). Benchmark data from Mailchimp 2024 Email Marketing Benchmarks Report and Google Postmaster Tools documentation. All data current as of June 2026.
Tools used in this guide
SPF DKIM DMARC Checker
Check all three authentication records for any domain with color-coded results and plain-English fix instructions. Free, no signup.
DMARC Record Generator
Build a valid DMARC TXT record for your domain. Free.
Email Deliverability Checker
Get a 0-100 deliverability score for your domain based on DNS authentication setup. Free, no signup.