What is DKIM?
DKIM (DomainKeys Identified Mail) adds a digital signature to every email you send, so the receiving server can confirm the message came from your domain and was not changed on the way. Your mail server signs with a private key, and the receiver checks the signature against a public key you publish in DNS.
It is the second of the three authentication records, between SPF and DMARC. SPF checks which server sent the mail. DKIM checks the message itself, which is why it survives forwarding when SPF often does not.
How it works
DKIM is defined in RFC 6376, published by the IETF in September 2011. When a message leaves, the sending server hashes selected headers and the body, signs that hash with the private key and adds the result as a DKIM signature header. Two tags in that header matter most: d= names the signing domain, and s= names the selector.
The selector tells the receiver where to find the public key. It looks up a TXT record at selector._domainkey.yourdomain.com, reads the key and verifies the signature. If anything in the signed parts changed in transit, the check fails. Selectors let one domain hold several keys at once, one per sending service, so Google Workspace and a marketing tool can each sign with their own.
Key length
RFC 8301, published in January 2018, updated the original standard. It says signers must use RSA keys of at least 1024 bits and should use keys of at least 2048 bits, and that receivers must not accept signatures made with keys shorter than 1024 bits. It also retired the older SHA 1 hashing for signing.
Google follows the same line. Its sender guidelines say sending to personal Gmail accounts requires a DKIM key of 1024 bits or longer, and recommend 2048 bits if your domain provider supports it.
Example
Setting up DKIM for a Google Workspace domain looks like this:
| Step | What happens |
|---|---|
| Generate the key | in the Admin console under Gmail authentication, choose the domain and a key length of 2048 bits |
| Keep the selector | the default prefix selector is google |
| Publish the record | add a TXT record at google._domainkey with the value Google shows |
| Start signing | return to the Admin console and turn on authentication |
| Confirm | send a test message and check the headers for dkim=pass with your domain |
Each other service that sends as your domain, such as a CRM or a newsletter tool, needs its own selector and record from that vendor.
Why it matters for cold email
DMARC passes when SPF or DKIM passes for the same domain the reader sees in the From line. DKIM is usually the more reliable of the two for that, because it travels with the message. Google Postmaster Tools also bases its spam rate reporting on DKIM authenticated mail, so a domain without DKIM gives you less visibility into your own sender reputation.
Common mistakes
- Never turning signing on. In Google Workspace, publishing the DNS record is only half the job. Mail is not signed until authentication is switched on in the Admin console.
- Signing with the provider's domain. Some tools sign with their own domain by default. The message passes DKIM, but the domain does not match your From line, so it does nothing for DMARC. Set up custom DKIM for your domain in each tool.
- Short keys. A 1024 bit key meets the minimum. Use 2048 bits where your DNS host allows it.
- Forgetting secondary domains. Every domain used for outbound needs its own DKIM key and record.
Related terms
- SPF
- DMARC
- Sender reputation
- Email warmup
If you want your sending domains checked before the next campaign, book a free working session and we can work through it together.
Sources
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures, IETF, checked 2026-11-20
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM), IETF, checked 2026-11-20
- Set up DKIM, Google Workspace Help, checked 2026-11-20
- Email sender guidelines, Google, checked 2026-11-20
- Postmaster Tools dashboards, Google, checked 2026-11-20