DKIM setup for office365

DKIM setup for office365

Steps to Add DKIM in Microsoft 365

  1. Log in to Microsoft 365 Admin Center
    👉https://admin.microsoft.com

    Sign in with Global Admin or Exchange Admin credentials.

  2. Go to Defender Portal
    Navigate to:
    Admin centers → Security
    or directly open:
    https://security.microsoft.com

  3. Open DKIM Settings
    Go to:
    Email & collaboration → Policies & rules → Threat policies → DKIM

  4. Select Your Domain

    • Choose the domain for which you want to enable DKIM

    • Click on the domain name

  5. Create DKIM DNS Records

    • Microsoft will show two CNAME records:

    • Record 1

      • Host / Name: selector1._domainkey.yourdomain.com

      • Type: CNAME

      • Value / Points to: selector1-yourdomain-com._domainkey.yourtenant.onmicrosoft.com

      Record 2

      • Host / Name: selector2._domainkey.yourdomain.com

      • Type: CNAME

      • Value / Points to: selector2-yourdomain-com._domainkey.yourtenant.onmicrosoft.com

    • Copy these records

  6. Add CNAME Records in DNS

    • Log in to your DNS hosting provider

    • Add both CNAME records exactly as provided by Microsoft

    • Save the changes

  7. Wait for DNS Propagation

    • DNS propagation can take a few minutes up to 24 hours

  8. Enable DKIM

    • Return to the DKIM page in Microsoft Defender

    • Select the domain

    • Click Enable

  9. Verify DKIM Status

    • Once enabled, DKIM status will show as Enabled for the domain in your MS admin panel.

    • You can validate using email headers or DKIM lookup tools.

 

Please pay close attention to the domainGUID which does not use a full stop "." but a hyphen "-" instead. This is taken from the MX record of your custom domain, in this case, aby.com

 

The CNAME record value syntax will also show up when you click on Enable DKIM from your Exchange admin center: 

 

The reason behind the two CNAME records is because Microsoft rotates the two keys for added security.

 

Enabling DKIM signing

Once you have added the CNAME records (two per domain) DKIM signing can be enabled through the Office 365 admin center. 

 

For more information, refer to this article.