To turn on DKIM in Google Workspace, generate the key in the Admin console (Gmail > Authenticate email), publish a TXT record named google._domainkey with the value Google gives you at your DNS host, then click Start authentication once the record is live. Order matters: clicking before the DNS record exists is the first cause of failure.
DKIM signs every outgoing message. The receiving server finds the public key in your DNS and checks that the message was not altered. Without a signature in your name, DMARC has only SPF to rely on, and a simple forward is enough to break it.
Last checked: 29 November 2026, in Google Workspace's official documentation.
Before you start
- You need administrator rights on Gmail settings. According to Google, generating the key requires super administrator access.
- Gmail must have been turned on for the domain long enough: Google says to wait 24 to 72 hours after turning on Gmail before you can get the key. Generating sooner may cause the "DKIM record was not created" error.
- Each domain has its own DKIM key. For a secondary domain, repeat the procedure and pick it in the list.
- You must be able to edit the DNS zone, wherever it is hosted.
Step 1: generate the key
- In the Admin console, open Menu > Apps > Google Workspace > Gmail, then Authenticate email.
- In Selected domain, choose your domain.
- Click Generate new record.
- Choose the key length: 2048 bits (Google recommends it if your DNS host supports it) or 1024 bits otherwise.
- Keep the default selector prefix,
google. Change it only if your domain already has a DKIM key with that prefix. - Click Generate.
Step 2: publish the TXT record
At your DNS host, create a TXT record:
- Host name: the selector followed by
._domainkey, sogoogle._domainkeyby default. Most interfaces append the domain themselves. - Value:
v=DKIM1; k=rsa; p=<your key>, copied as is from the console.
The 255-character trap
A 2048-bit key does not fit in a single 255-character TXT string. Google says it plainly: you cannot enter a 2048-bit key as a single string with that limit. Three options:
- Use a DNS host that accepts long TXT records: it splits the value for you.
- Otherwise split the key into several strings, each in quotes, in order, in the value field.
- As a last resort, generate a 1024-bit key.
Never split inside the key by adding a space or a line break: the key would be invalid.
Another limit noted by Google: most providers support about 49 TXT records on one name; stay below that.
Step 3: start authentication
- Go back to Authenticate email.
- Select the domain and click Start authentication. Do not do it before the record is added at your DNS host.
- When everything is correct, the status becomes "Authenticating email with DKIM".
Google says DKIM can take up to 48 hours to start working after you add the key, and that the message "You must update the DNS records for this domain" can stay displayed during that time even if your record is correct.
Step 4: verify
From a Windows terminal:
nslookup -type=TXT google._domainkey.example.comWith dig:
dig +short TXT google._domainkey.example.comYou must get a line starting with v=DKIM1; k=rsa; p=. If the key is split, dig shows several quoted pieces: that is normal.
Then the real test, the one Google recommends: send a message to another Gmail or Google Workspace address. A test to yourself proves nothing. Open the received message, More > Show original, and look in Authentication-Results for dkim=pass with header.d=example.com.
Our free DKIM checker tests the standard google selector from the Internet.
Causes of failure and their fix
These are the cases Google describes in its troubleshooting help.
- No record found: the "DNS host name" and "TXT value" fields are empty in the console. Generate the key pair, then publish the record.
- "Not authenticating": the record exists in DNS but you have not clicked Start authentication yet.
- Name or value mismatch: compare what the console shows with what your DNS returns. Google suggests the Dig tool with the full host name.
- Truncated key: the 255-character limit cut the value. Redo the splitting or move to 1024 bits.
- Quotes or order of the pieces: each part must be in quotes and entered in order.
- Signature broken in transit: a forwarded message, or one changed by a gateway that adds a footer, can show "body hash did not verify". Stop the gateway from changing outgoing mail.
- Too many signatures: Gmail checks only the first 5 signatures in the
Authentication-Resultsheader. If the valid one comes later, DKIM fails and DMARC can fail with it. - The
l=tag: do not use the length tag in outgoing messages. - Spam despite valid DKIM: the cause lies elsewhere, in your sending practices. See Google's sender guidelines.
One point Google's page does not cover: the domain typed twice in the host name (google._domainkey.example.com.example.com). Check it at your DNS host with the command above.
Frequently asked questions
My domain also sends through a third-party tool (newsletter, CRM): do I have another DKIM to set up?
Yes. Google's key only signs mail sent by Google. Each sending tool asks for its own selector in your DNS. Several selectors coexist without problem as long as their names differ.
Should I rotate the key?
The Google help page we read does not describe a rotation procedure: if you want one, check Google's Set up DKIM page directly. In any case, remove an old key from DNS only after you have confirmed that the new one signs.
Is DKIM enough to stay out of spam?
No. It is one of three checks, with SPF and DMARC. See our DMARC checker and SPF checker for the rest.
Check that it is fixed. AttackScout reads your DKIM, SPF and DMARC from the Internet and tells you what is left to do. Free, no account: DKIM checker. For continuous monitoring, see pricing.
Technical details
Exact configuration. One TXT record on the name google._domainkey:
google._domainkey.example.com TXT "v=DKIM1; k=rsa; p=<public key>"Why. DKIM (RFC 6376) signs the headers with a private key kept by Google; the signature carries d= (domain) and s= (selector). The receiving server looks for the public key under s._domainkey.d. A 2048-bit RSA key is longer than 255 characters: it is published as several strings in one TXT record.
Check it yourself.
dig +short TXT google._domainkey.example.comReference: https://www.rfc-editor.org/rfc/rfc6376
Sources
Read on 29/11/2026.
- Google Workspace, Set up DKIM: https://knowledge.workspace.google.com/admin/security/set-up-dkim
- Google Workspace, Troubleshoot DKIM issues: https://knowledge.workspace.google.com/admin/security/troubleshoot-dkim-issues
- IETF, RFC 6376 (DKIM): https://www.rfc-editor.org/rfc/rfc6376