To set up DKIM for Google Workspace, a super administrator generates a key in the Admin console under Gmail > Authenticate email, publishes the TXT record at the DNS host, and then clicks Start authentication. The status then changes to "Authenticating email with DKIM", and you confirm it by reading the Authentication-Results header on a message received in another mailbox. If the console says "Not authenticating", the usual fix is to finish the last step or correct the published record.
Who this is for and what you will have at the end
This guide is for owners and administrators of a Google Workspace domain who send business email from Gmail and want messages to pass DKIM, one of the three checks (with SPF and DMARC) that receiving servers use to decide whether mail really came from your domain. It also suits anyone who has already added the record and is looking at a "Not authenticating" or "DKIM record not found" message.
At the end you will have a DKIM key generated for your domain, a TXT record published at your DNS provider, signing turned on, and a header check that proves it works. You will also have a short list of the failures Google itself documents and how to deal with each.
DKIM (DomainKeys Identified Mail) works by signing outgoing messages with a private key held by Google. Receiving servers look up the matching public key in your DNS at <selector>._domainkey.<your domain> and use it to check that the signature is valid and the message was not altered. It does not, by itself, stop anyone from spoofing your domain; that is DMARC's job. If you also use Microsoft 365, the equivalent process is covered in SPF, DKIM and DMARC for Microsoft 365.
Prerequisites
Check these before you start, because most failed setups trace back to one of them.
| Requirement | Detail from Google's documentation |
|---|---|
| Admin role | You must be a super administrator to generate the key. Opening the Gmail page requires the Gmail Settings administrator privilege. |
| Gmail turned on | If you only just turned on Gmail for the domain, wait 24-72 hours before generating the key. Generating it too early can cause an error that the DKIM record was not created. |
| DNS access | You need to add a TXT record at whoever hosts your DNS (a registrar, Cloudflare, GoDaddy and so on). Google does not offer technical support for third-party DNS providers. |
| No interfering gateways | Outbound gateways must not interfere with DKIM, for example by altering the message after it is signed. |
Also decide whether you are setting up one domain or several. Each domain needs its own key, generated separately in the Admin console, so you repeat every step for each one. Google's page does not mention domain aliases, so do not assume an alias is covered; check the Authenticate email page for the domains it lists.
Step 1: Generate the DKIM key in the Admin console
- Sign in to the Google Admin console as a super administrator.
- Go to Menu > Apps > Google Workspace > Gmail, then click Authenticate email.
- In the Selected domain menu, choose the domain you are setting up.
- Click Generate New Record.
- In the Generate new record box, choose the key length. Google's guidance is:
- 2048 is recommended if your domain provider supports it.
- 1024 is for providers that do not support 2048-bit keys.
- Set the prefix selector. The default is
google, which Google recommends for Google Workspace. Only change it if that prefix is already used for DKIM on the domain, in which case enter a different one. - Click Generate. The message DKIM authentication settings updated should appear.
The console now shows two values you need to copy:
| Console label | What it contains |
|---|---|
| DNS Host name (TXT record name) | The prefix selector followed by ._domainkey, for example google._domainkey |
| TXT record value | Formatted as v=DKIM1; k=rsa; p=<key>, where <key> is your public key |
Keep the page open or paste both values into a safe note. Do not click Start authentication yet; that is the last step and only works after the record is published.
Step 2: Publish the TXT record at your DNS provider
At your DNS host, add a new record with these settings:
| Field | Value |
|---|---|
| Type | TXT |
| Host / Name | The selector plus ._domainkey, for example google._domainkey |
| Value | The full TXT record value from the console |
Provider interfaces differ in one important way: some append your domain automatically to the host name and some expect the full name. If your provider appends the domain for you, enter only google._domainkey. If you end up with a record at google._domainkey.contoso.com.contoso.com, the lookup will fail. A TXT record at a subdomain follows the same pattern, but check with your provider how it expects subdomain records to be entered.
Google's setup page says DKIM can take up to 48 hours to start working after you add the key. Plan for that documented window before you decide something is wrong.
When the key is too long for the TXT field
A DKIM TXT value for a 2048-bit key is long. Google's troubleshooting page states that most DKIM TXT records support up to 255 characters per string and that you cannot enter a 2048-bit key as a single text string under that limit. Some providers show an error when you paste the value; others silently truncate it, which leads to a record that exists but never validates.
You have three options, all from Google's troubleshooting page:
- Split the value into multiple text strings, put each string in quotes, and enter them one after another in the TXT Value field. Receivers join the strings back together.
- Use a 1024-bit key instead, by generating a new record with 1024 selected in Step 1.
- Ask your domain host whether it supports TXT records longer than 255 characters.
A split value looks like this, with the key shortened here for readability:
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...first-part"
"...second-part...IDAQAB"Many providers do the splitting for you if you paste the whole value, so check what the provider actually stored rather than assuming. Google also recommends adding no more than 49 TXT records at your domain provider, which matters if you have accumulated verification and SPF records over the years.
Step 3: Start authentication
Once the record has had time to publish:
- Return to Menu > Apps > Google Workspace > Gmail > Authenticate email.
- Select the same domain in Selected domain.
- Click Start authentication.
The status should change to Authenticating email with DKIM. If you see an error instead, the console could not find a valid record at the selector you chose; go to the troubleshooting section below.
You may see You must update the DNS records for this domain on the Authenticate email page for up to 48 hours after you add a correct key. Google's page says you can ignore this message if you added the key correctly. The reliable test is whether Start authentication succeeds and a message shows a DKIM pass.
Step 4: Verify DKIM with a real message
The status label in the console only tells you the setting is on. To confirm that mail is actually signed and verified:
- Send an email from an address on your Workspace domain to a Gmail or Google Workspace address that belongs to someone else, or to a personal Gmail account. Google notes that sending to yourself will not verify DKIM.
- Open the received message. In Gmail, choose More > Show original.
- Look for the Authentication-Results header. A passing result reads like
dkim=passordkim=OK.
If there is no DKIM line at all, messages are not being signed. Recheck every step above, starting with whether Start authentication was clicked for the right domain.
You can also look at the published record directly with Google's Admin Toolbox Dig tool: enter the TXT record name (for example google._domainkey.contoso.com) and compare the result with the value in the Admin console. They must match character for character.
Troubleshooting
Google's own troubleshooting page lists the following symptoms and causes. Work through them in order.
"DKIM record not found" or blank DNS fields
If the DNS host name and TXT record values are blank on the Authenticate email page, no key has been generated for this domain. Generate a key pair as in Step 1, then publish the record.
Status shows "Not authenticating"
This appears after you create and add the DKIM record. According to Google, the fix is to open Authenticate email and click Start authentication to finish the setup. If the click works, the status changes to "Authenticating email with DKIM". If it does not, verify the record with the Dig tool, confirm you used the right selector, and allow the documented 48 hours.
An error when entering the value at the DNS provider
Your provider may limit TXT record length. Use the splitting approach or a 1024-bit key described above, or ask the provider about longer records.
The key is truncated or out of order
Google says your DKIM key might be truncated, or your records might be sent out of order. Compare the value published at your provider with the one in the Admin console using the Dig tool. A missing trailing character or an extra space inside the quotes is enough to break validation.
"body hash did not verify"
This text appears in the Authentication-Results header when the message was changed after signing. Google points to forwarding services and outbound gateways that add footers or rewrite content. If you route outbound mail through a gateway or a third-party mail-signature product, make sure the signing happens last or that the gateway signs with its own key.
Forwarded mail fails DKIM
Forwarding can modify a message and cause DKIM to fail at the final destination. Google suggests confirming forwarding with Email Log Search and asking the forwarding service to change its method.
More than five signatures
Gmail checks only the first five signatures in the Authentication-Results header. If the signature that would authenticate your domain falls outside those five, DKIM fails, and that can make DMARC fail too. This mostly affects messages that pass through several services that each add a signature.
The length tag
For systems other than Google Workspace that sign your mail, Google advises not using the DKIM length tag (l=) in outgoing messages, because messages with this tag are open to abuse.
Messages still go to spam
If DKIM is set up correctly but messages still land in spam, Google says the cause may be something other than DKIM. Review your sending practices against Gmail's guidelines, and check that SPF and DMARC are in place. If you suspect SPF is breaking, see SPF record too long: fix the 10-lookup limit.
Receiving servers reject signed mail
Contact the administrator of the rejecting server and set up DMARC so that you receive authentication reports showing what the receivers saw.
What comes after DKIM
DKIM is one third of the picture. Google recommends setting up SPF and DMARC as well, and says bulk senders, defined as those sending more than 5,000 messages a day, must set up DKIM, SPF and DMARC. A sensible order is: DKIM signing first, confirm a pass, then publish a DMARC record at p=none to collect reports, and tighten the policy only when the reports show every legitimate sender passing. If someone is already sending mail as your domain, see what to do when someone is sending email from your domain.
If your domain is hosted at Squarespace, Google's page says the DKIM key is created and added automatically, so you can skip straight to verification.
Closing checklist
- You are signed in as a super administrator and Gmail has been on for at least 24-72 hours.
- A key was generated for the right domain, with 2048 bits if your DNS provider can store it.
- The TXT record exists at
<selector>._domainkeywith the full value, split into quoted strings if needed. - The Dig tool output matches the Admin console value exactly.
- Start authentication was clicked and the status reads "Authenticating email with DKIM".
- A message to another mailbox shows a DKIM pass in Authentication-Results.
- SPF and DMARC are published or on your list for the same week.
- You repeated the process for every additional domain you send from.
What we checked
- Opened Google's "Set up DKIM" page (the old support.google.com/a/answer/174124 address redirects to knowledge.workspace.google.com/admin/security/set-up-dkim) on 2026-11-20 and copied the menu path, button labels, the default selector
google, the two key lengths, the success message and the TXT value format from it. - Opened Google's "Troubleshoot DKIM issues" page on 2026-11-20 and took the "Not authenticating", "DKIM record not found", "body hash did not verify", 255-character, five-signature and
l=tag guidance from it. - Cross-checked the 255-character TXT limit and the splitting method against a second search result summary of the same Google page, which says to put each string in quotes and enter them one after another in the Value field.
- Compared the two Google pages: the setup page says DKIM can take up to 48 hours to start working, while the troubleshooting page does not cover propagation times at all, so the 48-hour figure is attributed only to the setup page.
- Calculation: the TXT value prefix
v=DKIM1; k=rsa; p=is 18 characters, so any key portion of 238 characters or more pushes a single string past 255. A 2048-bit RSA public key encoded in the common 294-byte SubjectPublicKeyInfo form becomes 392 base64 characters (294 divided by 3, rounded up to 98 groups, times 4), about 410 with the prefix. That is hand arithmetic from the standard encoding, not a measurement of a key Google generated, and it is consistent with Google's statement that 2048-bit keys do not fit one 255-character string. - Documented output: Google states the success message after Generate is "DKIM authentication settings updated", and the status after Start authentication is "Authenticating email with DKIM"; a pass reads like
DKIM=passorDKIM=OKin Authentication-Results. - Not checked: we did not use a live Google Workspace tenant or DNS zone, so no key was generated and no message was sent. The steps follow Google's documentation as of 2026-11-20, and on-screen wording may change.
Last tested: 2026-11-20
References
- Google Workspace Admin Help, Set up DKIM: https://knowledge.workspace.google.com/admin/security/set-up-dkim (formerly https://support.google.com/a/answer/174124)
- Google Workspace Admin Help, Troubleshoot DKIM issues: https://knowledge.workspace.google.com/admin/security/troubleshoot-dkim-issues (also https://support.google.com/a/answer/11612790)
Comments
Questions and tips are welcome. Comments are checked by the EpiFive team before they appear; please do not share passwords, phone numbers or other private details.