Office 365 DKIM Setup Guide
Microsoft Office 365 provides built-in DKIM support that can be enabled for your custom domains.
Prerequisites
1. Administrator Access
- Need Office 365 Global Administrator or Exchange Administrator permissions
- Domain must be added to Office 365 and verified
2. DNS Access
- Ability to add CNAME records in your domain's DNS settings
Setup Steps
1. Access Exchange Admin Center
- Sign in to Office 365 Admin Center
- Go to "Admin centers" > "Exchange"
- In the left navigation, select "Protection" > "DKIM"
2. Enable DKIM
- Select the domain you want to configure
- Click the "Enable" button
- System will display the CNAME records you need to add
3. Add DNS Records
Office 365 will provide two CNAME records in this format:
Record 1:
- Name:
selector1._domainkey
- Type: CNAME
- Value:
selector1-yourdomain-com._domainkey.yourtenant.onmicrosoft.com
Record 2:
- Name:
selector2._domainkey
- Type: CNAME
- Value:
selector2-yourdomain-com._domainkey.yourtenant.onmicrosoft.com
4. Verify Configuration
- Wait for DNS propagation (usually 15-30 minutes)
- Return to Exchange Admin Center
- Click "Verify" button to confirm DKIM records
Advanced Configuration
1. Custom DKIM Keys
If you need to use custom DKIM keys:
- Generate 2048-bit RSA key pair
- Use PowerShell to configure custom selectors
- Publish public key to DNS
2. PowerShell Configuration
# Connect to Exchange Online
Connect-ExchangeOnline
# Enable DKIM
New-DkimSigningConfig -DomainName "yourdomain.com" -Enabled $true
# View DKIM configuration
Get-DkimSigningConfig -Identity "yourdomain.com"
Troubleshooting
1. Common Issues
- DNS records not propagated: Check DNS propagation status
- Verification failed: Confirm CNAME record values are correct
- Signing not working: Check domain verification status
2. Verification Tools
Use these tools to verify configuration:
3. Test Emails
Send test emails and check:
- DKIM-Signature field in email headers
- DKIM verification results at receiving end
Best Practices
1. Security Recommendations
- Regularly rotate DKIM keys
- Monitor DKIM verification status
- Configure DMARC policy
2. Monitoring and Maintenance
- Use Office 365 reports to monitor email flow
- Regularly check DKIM record status
- Stay updated with Microsoft announcements
Related Resources