techbullion.com

Microsoft 365 DKIM Selector Setup: Enable DKIM for a Custom Domain and Verify Records

By Engrnewswire·Published May 8, 2026·Latest News

In Microsoft 365, DKIM uses a DKIM selector to tell receiving systems which DNS location to query for the DKIM public key. The selector ensures the email receiver can retrieve the correct public key to validate the digital signature that Microsoft Exchange Online adds to outbound messages. Each message carries a DKIM-Signature header in the email headers, which includes the d= tag (the signing domain) and the s= tag (the DKIM selector). The combination of these tags points to a DNS name such as s._domainkey.d that holds the public key.

Microsoft 365 commonly uses two selectors—selector1 and selector2—for safe DKIM key rotation. Behind the scenes, Microsoft hosts the private key in its service boundary and uses it to sign messages; your DNS records, published under _domainkey, advertise the matching public key. Because DKIM is cryptographic authentication based on a key pair, the email sender’s private key never leaves Microsoft 365, while recipients fetch the DKIM public key via DNS lookup to verify the digital signature.

Anatomy of the DKIM-Signature header

The DKIM-Signature header is a compact map of how the signature was created and how to validate it. Key components include:

The d= tag and alignment

The d= tag should match or be a subdomain of the from address domain to support DMARC alignment and maintain email authenticity.

The s= tag and selector resolution

The s= tag supplies the DKIM selector that, when combined with the d= tag and the _domainkey label, yields the DNS name containing the public key.

Algorithm and headers covered

The a=rsa-sha256 algorithm signs selected headers listed in the h= field, ensuring email integrity across critical email headers such as From, Subject, and Date.

Prerequisites and Planning: DNS Access, Selector Strategy, and Rotation

Before implementation, confirm:

Create and Publish DKIM CNAME Records (selector1/selector2) for Your Custom Domain

To enable DKIM in Microsoft 365 for a custom domain (e.g., example.com), create two CNAME records in DNS under _domainkey:

You obtain the exact target hostnames from the Microsoft 365 admin experience for your domain. This approach delegates lookups to Microsoft 365 and ensures the public key is always current, while the private key remains securely managed in the service.

Record format and examples

The general naming pattern is:

Example: selector1 CNAME (example.com)

Example: selector2 CNAME (example.com)

TXT alternative with third-party sender

If a third-party provider like Salesforce.com or exampleprovider.com signs mail for your domain, they may instruct you to publish a TXT record at selectorX._domainkey.example.com that contains a p= value (the DKIM public key). This is not typical for Microsoft 365 but is common with non-Microsoft services. Follow each provider’s tool and guidance closely for key delegation.

Enable DKIM Signing in Microsoft 365 Admin Centers for Each Domain/Subdomain

After publishing the CNAME records, enable DKIM signing for the domain:

Microsoft 365 will then use the private key corresponding to the active DKIM selector to add a DKIM-Signature header to outbound messages. You can later switch to selector2 to perform DKIM key rotation with no disruption to mail delivery, as the DNS records under _domainkey continue to publish the correct public key.

Verify DKIM Records and Signatures, Rotate Keys Safely, and Troubleshoot Issues

Verification ensures your email authentication is functioning as intended and that recipients such as Gmail and Outlook can validate the digital signature.

Rotate keys safely:

  1. Publish and validate both selector1 and selector2 CNAME records.
  2. In Microsoft 365, switch signing to the alternate DKIM selector (selector2).
  3. Confirm via header inspection that the s= tag now shows selector2 in the DKIM-Signature header.
  4. After adequate propagation and monitoring, retire the previous selector as directed in policy.

Common pitfalls and fixes

 

Tools, Header Inspection, and Validation Workflows

A robust verification process uses multiple perspectives: