Skip to content
CyberVigil
Email security

How to set up DKIM for Google Workspace

Generate your DKIM key in the Google Admin console, add the google._domainkey TXT record at your DNS host, turn on signing, and test that Gmail shows dkim=pass.

By the CyberVigil teamHow we write and check guidesUpdated Oct 24, 20264 min read
Quick answer

To set up DKIM in Google Workspace, open the Google Admin console, go to Apps, Google Workspace, Gmail, then Authenticate email. Generate a 2048-bit key with the google selector, and add the TXT record it shows at google._domainkey on your domain. After the record publishes, which can take up to 48 hours, click Start authentication and send a test email.

Setting up DKIM for Google Workspace takes about 20 minutes of work, plus some waiting while your DNS record publishes. You'll need super administrator access to the Google Admin console and a login for the company that hosts your domain's DNS.

This guide follows Google's own steps, with notes on where people usually get stuck.

Why set up DKIM in Google Workspace?

DKIM adds a digital signature to every email your business sends. Receiving servers look up your public key in DNS and use it to confirm the message came from your domain and wasn't changed on the way.

It matters most for DMARC. DMARC passes when either SPF or DKIM passes and matches your domain. SPF often fails when an email is forwarded, so a DKIM signature is what keeps forwarded messages passing. Google's email sender guidelines also require every sender to set up SPF or DKIM, and bulk senders to set up both.

What do I need before I start?

  • Sign in to the Google Admin console as a super administrator.
  • Have a login for your DNS host. That's usually where you bought your domain, or Cloudflare if you moved your DNS there.
  • If you only just turned on Gmail for your organization, wait. Google says to allow 24 to 72 hours before generating a DKIM key, or you may get an error.

If Squarespace is your domain provider, Google says the DKIM key is created and added for you, so you can skip ahead to turning on authentication.

How do I generate my DKIM key?

  1. In the Google Admin console, go to Menu → Apps → Google Workspace → Gmail.
  2. Click Authenticate email.
  3. In the Selected domain menu, choose your domain.
  4. Click Generate New Record.
  5. Choose 2048 for the key length. Choose 1024 only if your DNS host doesn't support longer keys.
  6. Leave the prefix selector as google, unless your domain already uses a DKIM key with that name for another service.
  7. Click Generate, then copy the DNS Host name and TXT record value.

Don't click Start authentication yet. Google's page may say "You must update the DNS records for this domain" for up to 48 hours. You can ignore that once you've added the record.

What does the DKIM record look like?

  • TypeTXT
    Name / Hostgoogle._domainkey
    Valuev=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQABPlaceholder. Copy the full value from the Authenticate email page, which is much longer.

The name is your selector followed by ._domainkey. Most DNS hosts add your domain to the end automatically, so enter only google._domainkey. If the record ends up as google._domainkey.yourbusiness.com.yourbusiness.com, edit the name down.

How do I add the record at my DNS host?

Paste the whole value into one TXT record. If your host rejects it or cuts it short, see the next section.

Instructions for GoDaddy

  1. 1Sign in to your GoDaddy Domain Portfolio and select your domain.
  2. 2Select DNS, then Add New Record, and choose TXT as the type.
  3. 3Enter google._domainkey as the Name and paste the full value from Google.
  4. 4Select Save.
  • TypeTXT
    Name / Hostgoogle._domainkey
    Valuev=DKIM1; k=rsa; p=YOUR_KEY_FROM_GOOGLE

Check your SPF, DMARC and DKIM together

Our free checkup looks for DKIM at common selectors, including google, along with SPF, DMARC and your website basics.

  • Free check
  • No signup
  • No changes to your website

What if my DNS host says the key is too long?

Google's troubleshooting guide explains that most TXT records allow up to 255 characters per text string, and a 2048-bit key is longer than that. If your host truncates the key, DKIM will fail.

You have two options:

  1. Split the value into two or more pieces, put each piece in double quotes, and enter them one after another in the same TXT record. The pieces join back together when servers read the record.
  2. Go back to Google Admin and generate a 1024-bit key instead, then replace the record.

Ask your DNS host's support first. Many hosts accept the full value and split it for you.

How do I turn on DKIM signing?

Once the record has published, go back to the Authenticate email page:

  1. In the Google Admin console, go to Apps → Google Workspace → Gmail → Authenticate email.
  2. Select your domain.
  3. Click Start authentication.

When it's working, the status at the top of the page changes to "Authenticating email with DKIM." If you get an error, the record probably hasn't published yet. Wait a few hours and try again.

How do I check that DKIM is working?

  1. Send an email from your business address to someone on Gmail or another Google Workspace account. Google says sending a test to yourself won't verify it.
  2. Open the message, click the three-dot menu next to Reply, and choose Show original.
  3. Look for dkim=pass in the Authentication-Results line, with your domain after header.d=.

You can also re-run the free DMARC checker or a full CyberVigil scan, which looks for a key at the google selector.

What should you do next?

Common questions

Does Google Workspace sign my email with DKIM by default?

Google signs with a default key for its own domain, but that signature doesn't match your business domain, so it doesn't help your DMARC result. Google says you might not need to set up DKIM if it's already set up for your domain, for example if you bought the domain from a Google partner. Check the Authenticate email page to see your status.

How long does it take for DKIM to start working?

Google says it can take up to 48 hours after you add the record. Many DNS hosts publish the record much faster. If Gmail was only just turned on for your organization, Google also says to wait 24 to 72 hours before generating the key.

Should I pick 2048-bit or 1024-bit?

Pick 2048-bit if your DNS host supports it. Google says longer keys are more secure and recommends 1024-bit only when a domain host doesn't support 2048-bit keys.

My DNS host says the value is too long. What do I do?

Google notes that most TXT records allow up to 255 characters per string, so a 2048-bit key may need to be split. Break the value into two or more quoted strings and enter them one after another in the same TXT record, or use a 1024-bit key.

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

Yes. DMARC passes when SPF or DKIM passes and matches your domain. SPF often fails when an email is forwarded, while a DKIM signature usually survives forwarding, so DKIM keeps your DMARC results steady.

Can I test DKIM by emailing myself?

Not reliably. Google says you can't verify DKIM by sending yourself a test message. Send it to someone on Gmail or another Google Workspace account instead and check the headers there.

Sources

  1. Set up DKIM (Google Workspace Admin Help)
  2. Troubleshoot DKIM issues (Google Workspace Admin Help)
  3. Email sender guidelines (Gmail Help)
  4. Create DNS records (Cloudflare Docs)
  5. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures (IETF / RFC Editor)
Next steps

Keep building a safer business

Security is an ongoing process, but it doesn't have to be complicated. Run a free scan, fix what matters most, and check back for more guides.