MailAuth Tools

Turn on DKIM in Microsoft 365

Out of the box, Microsoft 365 signs your mail with its onmicrosoft.com domain. For DMARC to pass you need it signing with your own domain.

Before you start

You need Global Admin or Security Admin rights, and access to wherever your domain's DNS is hosted.

1. Get your CNAME records

  1. Open the Microsoft Defender portal at security.microsoft.com.
  2. Go to Email & collaboration → Policies & rules → Threat policies → Email authentication settings, then the DKIM tab.
  3. Click your domain. The panel shows two CNAME records, one for selector1._domainkey and one for selector2._domainkey.

2. Add them at your DNS host

Create both as CNAME records (not TXT). Copy the values exactly. If your DNS host is Cloudflare, set them to "DNS only" (grey cloud).

3. Switch on signing

Wait 15–60 minutes, go back to the DKIM tab and turn on Sign messages for this domain with DKIM signatures. If it complains the CNAMEs aren't found, wait a little longer. DNS hasn't caught up yet.

4. Check it

Run the DKIM checker with your domain. You should see a key on selector1 or selector2. Then send yourself an email at a Gmail address, choose "Show original" and look for DKIM: PASS with domain yourdomain.com.

Rotate to 2048-bit

Older tenants may still have 1024-bit keys. On the same DKIM page, use Rotate DKIM keys to move to 2048-bit.

Would you rather someone just fixed it? I'm an IT engineer in Sydney with 9 years of Microsoft 365 work. I'll set up SPF, DKIM and DMARC properly for your domain and send you a plain-English report. See the fixed-price service on Fiverr.
Checking lots of domains? There's a bulk checker on Apify that grades hundreds at once.

Common questions

Do I need to do this for every domain?

Yes, each custom domain in the tenant that sends email needs its own two CNAMEs and signing turned on.

Will turning on DKIM break anything?

No. It only adds a signature. Mail keeps flowing while you set it up.

Free checks