DKIM puts a digital signature on every message your Google Workspace users send, and receivers check it against a public key in your domain's DNS. Google makes the key for you in the Admin console, so you don't need a separate DKIM generator. Your part is copying one TXT record to your DNS host and then telling Google to start signing.
Until you do, Gmail signs your mail with a Google domain instead of yours. That's enough to get delivered, but it doesn't help DMARC pass for your domain, and Gmail requires DKIM from anyone sending 5,000 or more messages a day to personal Gmail accounts (see Gmail and Yahoo sender requirements).
Before you start
- A super administrator account in Google Workspace. Google's steps need the Gmail settings administrator privilege, which super administrators have.
- Access to your DNS host, wherever your domain's DNS records are managed. That isn't always where you bought the domain. Rigcheck shows your DNS host at the top of your results.
- A little patience on a new account. Google says to wait 24 to 72 hours after turning on Gmail before you generate the key. Trying sooner can fail with an error that the DKIM record wasn't created.
If your domain is registered with Squarespace Domains, Google says DKIM is set up for you automatically, and you can skip ahead to Step 4.
Personal @gmail.com accounts have nothing to set up: there's no domain of your own to sign for. This guide is for Google Workspace on your own domain.
Step 1: Generate the key in the Admin console
- In the Google Admin console, go to Menu → Apps → Google Workspace → Gmail.
- Click Authenticate email.
- In the Selected domain menu, choose the domain you're setting up. Each domain in your account needs its own key.
- Click Generate new record.
- Choose the key length (see Step 2) and leave the prefix selector as
google(see below). - Click Generate. Google shows the message DKIM authentication settings updated, a DNS host name and a long TXT record value.
Don't click Start authentication yet. Google's own instructions say to add the record to your DNS first. You'll come back to this page in Step 4.
The google selector
The prefix selector is the name Google puts in front of ._domainkey to say where the key lives. The default, google, is what Google recommends, and it means the key goes in DNS at google._domainkey.yourdomain.com.
Only change it if your domain already has a key at google._domainkey that you need to keep, for example from an earlier setup. Then pick a different prefix, and use that name everywhere this guide says google. DKIM selectors explained covers how selectors work in more detail.
Step 2: Choose 2048 or 1024 bits
Google offers two key lengths:
| Key length | When to use it |
|---|---|
| 2048 bits | The default choice. Google says longer keys are more secure and recommends 2048 if your DNS host supports it. |
| 1024 bits | Only when your DNS host can't store a 2048-bit key. Gmail accepts keys of 1024 bits or longer, so a 1024-bit key still passes. |
The reason some DNS hosts struggle is length. Google notes that most DNS hosts limit a single TXT string to 255 characters, and a 2048-bit key is longer than that: about 400 characters, against about 220 for a 1024-bit key. DNS handles this by storing one record as several strings, and most DNS hosts do that for you when you paste the long value. A few older ones don't, and either cut the value off or refuse to save it.
So choose 2048 first. If your DNS host rejects the value or Step 5 shows the key was cut off, try entering it as several quoted strings (below). If your host can't do that either, generate a new record in the Admin console with 1024 bits instead. Google says you can move from 1024 to 2048 later if your provider adds support.
Step 3: Add the TXT record at your DNS host
At your DNS host, create a TXT record with the host name and value Google showed you:
google._domainkeyTXTv=DKIM1; k=rsa; p=... value from the Admin consoleCopy the value in one go, from v=DKIM1 to the last character. Missing even one character makes the key unusable. If you send from more than one domain, each gets its own record with its own key.
If your DNS host needs the key split
For DNS hosts that won't take the long value as it is, Google's troubleshooting advice is to split the key into several strings, put each one in double quotes, and enter them one after another in the same TXT value field. For example, with the key broken into two parts:
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...first part" "...second part of the key"Split it anywhere, as long as no string is over 255 characters and nothing is added or left out between them. Receivers join the strings back together with nothing in between.
Step 4: Start authentication
Once the record is saved, go back to Menu → Apps → Google Workspace → Gmail → Authenticate email, choose the domain and click Start authentication.
When it works, the status at the top of the page changes to Authenticating email with DKIM. This is the step that turns signing on. Publishing the record alone doesn't make Google sign your mail, and no outside tool can tell whether you clicked it, because the setting isn't in DNS.
Google says DKIM can take up to 48 hours to start working after you add the key, and the page may keep showing You must update the DNS records for this domain for up to 48 hours. If you've added the record correctly, you can ignore that reminder while you wait.
Step 5: Confirm it works
- Run your domain through the Google Workspace DKIM checker. It reads the key at
google._domainkey(or the prefix you chose), confirms it's complete and at least 1024 bits, and names the problem if it isn't. - Send a message from your Workspace account to someone on Gmail or another Google Workspace domain. Google notes you can't check DKIM by sending a message to yourself.
- In the recipient's Gmail, open the message, tap the three-dot menu and choose Show original. Look for DKIM: PASS with your domain, or
dkim=passin theAuthentication-Resultsline. If there's no DKIM result at all, the message wasn't signed.
In the same headers, the DKIM-Signature line should show d=yourdomain.com and s=google. If d= is a Google domain instead, signing isn't on for your domain yet: go back to Step 4.
Common failures
The record is there, but checkers can't find it yet
New records take time to show up everywhere, and a resolver that looked up the name before you added it can keep its "nothing here" answer for a while. The DNS propagation checker shows which big public resolvers can see it: choose TXT and enter google._domainkey. followed by your domain. If none of them see it after an hour, the record is probably misnamed or at the wrong DNS host. DNS changes not showing up covers the usual causes.
The key is cut off or split wrong
A key that was copied partly, saved by a DNS host that truncates long values, or split into separate records looks fine at a glance and fails every check. The Google Workspace DKIM checker reads the key itself, so it catches a missing chunk, stray quote marks and a key spread over two records.
Wrong host name
Besides the doubled domain above, check that the name is exactly what Google showed: google._domainkey, with the underscore and the dot. A record at google.domainkey, _domainkey.google or at the root of your domain is never found. From a computer, this shows what public DNS really has:
dig TXT google._domainkey.yourdomain.com +shortIt should print your v=DKIM1; k=rsa; p=... value. Nothing at all means the record is missing, misnamed or not live yet.
DKIM was never turned on
If the checker passes but Show original shows no DKIM result for your domain, Start authentication wasn't clicked, or Google hasn't seen the record yet. Check the status on the Authenticate email page. A Not authenticating status after you've added the record means you still need to click it.
Mail passes DKIM, then fails after it leaves Google
If your mail goes out through an outbound gateway or a service that adds a footer or disclaimer after Gmail sends it, the change breaks the signature. Google's advice is to make sure the gateway doesn't modify messages after they're signed.
Other problems
- Mail from other tools still fails DKIM. This key only covers mail sent through Gmail. Your newsletter tool, CRM or website's contact form each need DKIM set up in their own settings, usually under a selector of their own.
- The Generate new record button is missing. On a new account, wait the 24 to 72 hours Google mentions after turning on Gmail, and check that you're signed in as a super administrator.
Next: DMARC
With DKIM signing for your domain, DMARC can pass. DMARC setup for Google Workspace walks through Google's rollout from p=none to reject, and the Google Workspace SPF, DKIM and DMARC guide covers SPF alongside it.