Microsoft 365
Turn on DKIM signing for Exchange Online with the selector1 and selector2 CNAMEs
DKIM for Microsoft 365
Microsoft 365 signs mail from your custom domain once two CNAME records are published and signing is switched on.
Who does it
A Microsoft 365 Global Administrator (or a member of the Exchange Organization Management role group), plus whoever manages your DNS.
Records
- Two CNAME records per domain:
selector1._domainkeyandselector2._domainkey. - The targets are generated by Microsoft. Domains added since May 2025 get targets ending in
dkim.mail.microsoft; older domains end inonmicrosoft.com. Always copy the values Microsoft shows you; never build them by hand. - Each subdomain that sends mail needs its own pair.
Steps
- Open security.microsoft.com/authentication?viewid=DKIM (Defender: Email & collaboration › Policies & rules › Threat policies › Email authentication settings › DKIM).
- Select your domain. Try to switch the toggle to Enabled: Microsoft shows an error listing the two CNAME values. That is expected. Copy them (they are also under Publish CNAMEs in the domain's details).
- Create both CNAME records at your DNS host. Use a TTL of 3600.
- Wait a few minutes (occasionally up to 48 hours), then turn on Sign messages for this domain with DKIM signatures. The status should read Signing DKIM signatures for this domain.
Prefer PowerShell?
Connect-ExchangeOnline New-DkimSigningConfig -DomainName example.com -Enabled $false Get-DkimSigningConfig -Identity example.com | Format-List Selector1CNAME,Selector2CNAME # publish both CNAMEs, wait, then: Set-DkimSigningConfig -Identity example.com -Enabled $true
If DKIM management is turned on for this domain in DMARC Busta, we host your _domainkey records. Add this record in DMARC Busta instead of at your DNS host: open the domain's DKIM tab, click Import External Key, choose the platform, and enter the selector and value it gives you.
Check it worked
Send a message to an outside mailbox (Gmail or Outlook.com; mail inside your own organisation is not signed). The headers should show dkim=pass with header.d= your domain. Within a day or two, DMARC Busta's reports show Microsoft 365 passing DKIM as your domain.
Pitfalls
- Publish both selectors. With only selector1, key rotation fails later.
- They must be CNAME records, not TXT.
- Watch for the doubled domain name (
selector1._domainkey.example.com.example.com); GoDaddy and others add the domain for you. - On Cloudflare, set both records to DNS only.
- Microsoft 365's domain setup wizard may also flag your SPF record as not matching if your SPF is managed by DMARC Busta. That warning only compares text and can be ignored; real receivers follow the include. See Microsoft 365 says my SPF record doesn't match.