Email authentication

How to Set Up DKIM on Google Workspace & Microsoft 365

By Kalenfy · Updated 27 June 2026 · 7 min read

How to Set Up DKIM on Google Workspace & Microsoft 365

TL;DR: DKIM signs your outgoing email so receivers can verify it's really from you. To set it up you generate a key in your mail platform, publish it as a DNS record, then turn signing on. Below are the exact steps for Google Workspace and Microsoft 365. After you finish, scan your domain free to confirm DKIM is signing correctly.

Before you start

You'll need admin access to your mail platform and the ability to edit your domain's DNS records. DKIM works alongside SPF and DMARC — set all three for full protection.

Google Workspace

  1. Go to the Google Admin console → Apps → Google Workspace → GmailAuthenticate email.
  2. Select your domain and click Generate new record (a 2048-bit key is recommended; use the default selector google).
  3. Google shows you a TXT record. In your DNS, create a TXT record at google._domainkey.yourdomain.com with the value Google provides.
  4. Back in the Admin console, click Start authentication. It can take up to 48 hours, but usually works within an hour.

Microsoft 365

  1. Open the Microsoft Defender portal → Email & collaboration → Policies & rules → Threat policies → DKIM.
  2. Select your domain. Microsoft asks you to publish two CNAME records (selector1 and selector2) pointing to Microsoft's DKIM hosts.
  3. Add both CNAMEs in your DNS exactly as shown.
  4. Return to the DKIM page and toggle Enable for the domain. If it errors, the CNAMEs haven't propagated yet — wait and retry.

How to verify it worked

If it fails, see our guide on troubleshooting dkim=fail.

FAQ

Do I still need SPF and DMARC if I have DKIM?

Yes. DKIM proves integrity, but you need SPF too and a DMARC policy to actually block spoofing. All three work together.

What key length should I use?

2048-bit is the current recommendation. Some older DNS providers struggled with long keys, but most handle them fine today by splitting the record automatically.

How long until DKIM is active?

Usually under an hour after the DNS record propagates, though providers allow up to 48 hours.

Don't have time to wrangle DNS and admin consoles? Scan your domain, then reply to your report — we're developers and we'll set up DKIM (and SPF and DMARC) for you.

Check your own domain — free

Kalenfy runs a passive scan of your SPF, DKIM, DMARC, DNSSEC, CAA and more, then gives you a downloadable PDF report with exact fixes. You see your grade first — no email needed to view it.

Scan my site free

Related guides