Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

How to set up DKIM, step by step

To set up DKIM, generate a key in your email provider, publish the TXT (or CNAME) record it gives you in DNS, wait for it to resolve, then switch signing on and confirm dkim=pass in a test message. Google Workspace uses a TXT record; Microsoft 365 uses two CNAMEs.

The short answer
  • Publish the DNS record first, then activate signing. Turning it on early causes failed checks.
  • Google uses TXT at google._domainkey. Microsoft 365 uses CNAMEs at selector1 and selector2.
  • Choose a 2048-bit key if your DNS host accepts long TXT values.
Try the dmarc checkerFree, live, no signup

What are the steps to set up DKIM?

  1. 01

    Find the DKIM page in your mail platform

    In Google Workspace it is Apps, Google Workspace, Gmail, Authenticate email in the Admin console.

  2. 02

    Generate the key

    Choose 2048 bits if your DNS host supports it. Keep the default selector google unless another service already uses it.

  3. 03

    Publish the record at your DNS host

    Host is selector._domainkey, for example google._domainkey. Value is v=DKIM1; k=rsa; p=your key.

  4. 04

    Wait for DNS

    Google says allow up to 48 hours for DKIM to start working. Do not click Start authentication before the record exists.

  5. 05

    Turn signing on

    Click Start authentication (Google) or enable signing for the domain (Microsoft).

  6. 06

    Test

    Send to a Gmail or Workspace address that is not yourself, open Show original and look for dkim=pass.

How do Google and Microsoft differ?

DKIM record shapes from each vendor documentation
ItemGoogle WorkspaceMicrosoft 365
Record typeTXTTwo CNAME records
Host namegoogle._domainkey (default selector)selector1._domainkey and selector2._domainkey
Valuev=DKIM1; k=rsa; p=keyTargets copied from the Microsoft 365 admin center
Key length1024 or 2048 bits, your choiceSet by Microsoft
Wait timeUp to 48 hours after publishingVerification runs in the admin center

What should you check afterward?

  • dkim=pass in Authentication-Results of a message received at another provider
  • The d= value in the signature is your domain, not the vendor, so DMARC can align
  • Every other service that sends as you (newsletter tool, CRM) has its own DKIM set up
  • The record is not duplicated, for example google._domainkey.example.com.example.com

Third-party senders need their own DKIM

Your mail platform signs only its own mail. A newsletter tool or CRM sends from different servers and needs its own DKIM records, published in your DNS, so its mail signs with your domain.

What problems come up during setup?

DNS host rejects the long key

Some DNS panels cannot store a 2048-bit TXT value. Google says to choose 1024 only if your host does not support 2048.

Key generated too early

Google says to wait 24 to 72 hours after turning on Gmail before generating the key, or you may get a record error.

Extra domain suffix

Entering the full name in a panel that appends the domain creates google._domainkey.example.com.example.com.

What do the two record styles look like?

Zone file examples (key shortened)
google._domainkey.example.com.     IN TXT   "v=DKIM1; k=rsa; p=MIIBIjANBg..."
selector1._domainkey.example.com.  IN CNAME selector1-example-com._domainkey.tenant.onmicrosoft.com.
; the Microsoft CNAME target is shown to you in the admin center; copy it exactly

Common questions

How long does DKIM take to start working?

Google states allow up to 48 hours after the DNS record is added. In practice resolvers often see it sooner, but do not activate signing until a lookup returns the record.

What is the DKIM host name format?

selector._domainkey.yourdomain. For the Google default that is google._domainkey. Many DNS panels append your domain automatically, so enter only google._domainkey there.

Do I need DKIM for every service that sends my email?

Yes. Each service that sends as your domain should sign with a d= matching your domain, or a subdomain of it, for DMARC to align. Follow each vendor own DKIM guide.

Can I test DKIM by sending to myself?

Google says sending to yourself will not verify it. Send to an outside mailbox and read the Authentication-Results header.

Is DKIM required for Gmail?

For bulk senders, yes. Google requires SPF and DKIM for senders of 5,000 or more messages a day. Sending to personal Gmail accounts needs a key of 1024 bits or longer, and Google recommends 2048.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.