Set up DKIM Office 365: Step-by-Step Guide
Set up DKIM in Office 365 in just 5 minutes. Follow this 2025 step-by-step guide to publish CNAME records, enable DKIM, and fix setup errors easily.
Set up DKIM in Office 365 in just 5 minutes. Follow this 2025 step-by-step guide to publish CNAME records, enable DKIM, and fix setup errors easily.

Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
Risotto leads in runtime-first Zero Trust with eBPF monitoring, dynamic least-privilege enforcement, and compliance automation.
Misconfigured DKIM is one of the most common causes of email deliverability failure in Microsoft 365 (formerly Office 365) environments.
Without it, your outbound messages may pass SPF but still get flagged as unauthenticated. This triggers spam filters, fails DMARC alignment, and increases exposure to spoofing and phishing.
Microsoft’s DKIM configuration spans multiple admin portals and often requires PowerShell to finalize.
That complexity leads to incomplete setups or long delays in deploying proper domain authentication.
This guide simplifies the process into six clear, actionable steps. You’ll learn how to generate DKIM records, publish CNAMEs, activate signing, and verify that your custom domain is authenticating mail correctly.
Before you begin, ensure all required domain and admin settings are verified. Taking a few minutes to check these now can prevent hours of troubleshooting later
This section contains the essential steps to enable DKIM signing on your Office 365 domain. Follow these six steps carefully to ensure correct configuration, provided you’ve completed the prerequisites
You’ll only see domains that have been verified in your Microsoft 365 tenant. If your domain isn’t listed, it likely hasn’t been added or verified yet in the Microsoft 365 admin center.
Once you click into the DKIM settings for your domain, Microsoft will display two required CNAME records, these are the public keys for your domain.
They’re typically named:
They point to Microsoft-hosted DKIM key endpoints like:
These values are generated dynamically, so always copy them exactly as shown. Never modify or approximate them manually.
Note: Every provider’s DNS UI is different, but the selector names will always follow this pattern:
Cloudflare Proxy Warning: Set these to ‘DNS Only.’ Do not proxy them, or Microsoft won’t be able to validate the records.
Also, if DKIM was set up previously (with another email provider), check for and remove any conflicting selector1/2._domainkey records first.
After saving the records, DNS propagation begins. This can take:
You can verify the records are live using tools like:
If DNS is detected, you’ll see the status update to “Signing”. If the toggle fails or you get an error like “CNAME record doesn’t exist for this config,” DNS may not have propagated yet, so try again in a few hours.
Authentication-Results: ... dkim=pass ...
Also, confirm that the domain listed under d= in the DKIM-Signature header matches your custom domain.
DMARC is another important record you need to set up. Read our DMARC guide for quick setup.
Use this section to quickly identify and fix the most common DKIM setup issues, without interpreting unclearMicrosoft errors or guessing.
Microsoft can’t detect the required selector1 and selector2 records.
DKIM is technically active, but Microsoft is still using the default tenant domain instead of your custom one.
DNS is live, but email headers show dkim=fail or no signature at all.
The email is being sent from a domain that doesn’t have DKIM enabled.
To confirm that everything is working correctly, send a test email and run it through the MailReach spam test. It will immediately indicate whether DKIM is passing and flag any DNS or signing issues before they impact inbox placement.
This method is intended for admins managing multiple domains, automating configuration across tenants, or managing domains that are not visible in the UI If you're managing a single domain, the Defender portal is faster and more reliable, while PowerShell provides greater administrative control.
Start by connecting to Exchange Online PowerShell using your Microsoft 365 admin credentials. This allows you to view and manage DKIM configurations at scale.
Run a command to list all DKIM configurations across your tenant. This helps you identify which domains already have DKIM set up and which still need attention.
If your domain isn’t listed, you’ll need to initialize DKIM manually. This creates the configuration and tells Microsoft to prepare DKIM keys for your custom domain.
Once initialized, you can retrieve the exact selector1 and selector2 CNAME records for that domain. These need to be published in your DNS settings just like with the standard method.
After confirming that the records have propagated, enable DKIM signing for the domain. This activates the configuration and starts signing outgoing mail.
Microsoft supports key rotation for enhanced security. If needed, you can trigger a rotation using a single PowerShell command. As long as both selectors remain in DNS, the transition is seamless.
PowerShell is an effective option for onboarding multiple domains or managing a global tenant.
Even with automation, DKIM represents only one component of your email authentication strategy. MailReach helps you monitor domain reputation and spam placement at scale, especially when you're managing volume across multiple brands or clients.
Set realistic expectations for timing. DKIM setup is fast on your end, but mailbox providers may not recognize changes immediately
Once you publish the CNAME records in your DNS, they can take effect in minutes, or in some cases, up to two full days. This depends on TTL values and your DNS host's update cycle.
Until the records propagate globally, Microsoft won't let you enable DKIM. If you're still seeing DNS errors after publishing the records, it's usually a propagation delay and not a misconfiguration.
After you’ve enabled DKIM in the Microsoft 365 portal and the system detects your records, signing takes effect immediately. All new outgoing mail will include a DKIM signature from that point forward.
However, DKIM doesn't apply retroactively. Any email sent before enabling DKIM will remain unsigned.
When rotating DKIM keys, allow extra time for the transition. Microsoft may delay active signing with the new selector for up to four days to ensure DNS changes are fully recognized.
Both selector1 and selector2 records should remain in DNS to avoid any disruption during key rollover.
In the first 24 hours after setup, mailbox providers like Gmail or Outlook might still treat your domain as unverified, particularly if they cannot detect the DKIM records yet. If you observe mixed inbox placement or lower open rates during this period, do not panic.
These are practical, long-term habits to maintain your DKIM configuration healthy, especially when you're managing deliverability across multiple mailboxes or business units. Each one includes a situational example so you know when it matters.
Microsoft 365 (formerly Office 365) defaults to 2048-bit DKIM keys. It is recommended to retain this setting. Some legacy systems still use 1024-bit keys, but many providers (including Gmail) now view those as weak.
Example: If your domain was previously set up with 1024-bit DKIM on another platform (like cPanel), switch to 2048-bit when migrating to Office 365. A mismatch in key strength can cause deliverability issues during warm-up or when enforcing DMARC.
Key rotation reduces the risk of compromise and helps maintain alignment with compliance standards.
Example: If you’re sending transactional or regulated emails (in fields like finance, healthcare, education), rotating DKIM keys every 6–12 months can satisfy internal audits and security reviews. It also reduces stale key exposure during domain or IT transitions.
For DKIM to pass DMARC alignment, the domain in the DKIM signature (d=) must match the domain in your From address.
Example: If you send from marketing@brand.com but your DKIM is still signed by onmicrosoft.com, DMARC will fail. This often happens when admins skip the last step of enabling DKIM for the custom domain. This should be corrected before you enforce a p=reject DMARC policy.
Even after DKIM is enabled, leave the CNAMEs in your DNS. Microsoft 365 uses both selectors to allow seamless key rotation.
Example: A junior team member might remove selector1._domainkey, thinking it’s redundant. This breaks key rollover and can cause signing to fail silently. Always leave both records published unless Microsoft explicitly says otherwise.
DKIM is one part of your domain's trust profile. To protect inbox placement, combine it with:
Example: If you're launching cold outreach from a new domain, DKIM alone won’t prevent spam filtering. Pairing it with SPF, a DMARC record (p=none to start), and an email warm-up tool gives mailbox providers consistent signals over time. This is especially important if your sending volumes increase rapidly.
Strong authentication is your technical foundation, but it’s only part of inbox placement. MailReach helps you maintain it with daily spam tests, domain reputation tracking, and an automated warm-up that respects your DKIM, SPF, and DMARC settings.
Setting up DKIM in Office 365 is quick but its impact compounds over time. You’ve now added a key layer of authentication that mailbox providers check when determining whether your cold emails land in the inbox or the spam folder.
DKIM serves as your technical foundation and verifies your domain identity. However, building a sender reputation requires ongoing effort..
The real challenge starts after setup. New domains, new inboxes, or sudden spikes in volume can still trigger spam filters, even with DKIM in place. Without consistent testing and monitoring, you won’t know if your reputation is improving or silently slipping.
This is where we can help. Ready to go further?
MailReach automates inbox warm-up, DKIM and SPF testing, and domain health monitoring across mailbox providers to ensure emails are delivered to your prospective client’s inboxes.
Every email in spam equals to a lost potential customer. Start improving your inbox placement today with MailReach spam testing and warmup.
Following the rules isn’t enough—know where your emails land and what’s holding them back. Check your spam score with our free test, and improve deliverability with MailReach warmup.

Set up DKIM Office 365: Step-by-Step Guide
.webp)
Email Frequency in 2025: Finding the Right Balance for Your Audience

Spam filters are limiting the number of cold emails that you can send per day. Details about cold emailing limits and our tips to automate the process.

To prevent emails from going to the Promotions Tab, you can go to Settings > Inbox and deselect Promotions. More tips in our article !

Email Domains Explained: How to Pick, Use, and Optimize for Maximum Deliverability

