DKIM, or DomainKeys Identified Mail, is an email authentication method that adds a digital signature to outgoing messages. Receivers check the signature using a public key published in the sender’s DNS.
Quick answer: Your mail provider signs each message with a private key, and you publish the matching public key as a DNS TXT record. If the signature checks out, the message wasn’t altered and the signing domain vouches for it.
Key Takeaways
- Signature in the header: Each message carries a DKIM-Signature.
- Public key in DNS: Receivers fetch it using a selector.
- Internet Standard: Defined in RFC 6376 (September 2011).
- Detects forgery: It was designed to spot forged sender addresses.
- Pairs with SPF and DMARC: Each covers a different gap.
DKIM vs SPF
| Feature | DKIM | SPF |
|---|---|---|
| Proves | The message is unaltered and signed | The sending server is allowed |
| Survives forwarding | Usually | Often not |
| Setup | Publish a public key | Publish a sender list |
| Record type | TXT (key) | TXT (list) |
Wikipedia describes DKIM as an email authentication method designed to detect forged sender addresses, where the recipient system verifies the signature using the sender’s public key published in the DNS. It is an Internet Standard defined in RFC 6376 from September 2011, which obsoleted RFC 4871 and RFC 5672.
Why DKIM Matters
Receivers trust signed mail more. A valid signature shows that the message came through a server authorized by the signing domain and that its content wasn’t changed on the way.
Because the signature rides inside the message, it usually survives forwarding better than SPF, which checks the sending server.
How to Set Up DKIM
Step 1: Generate Keys in Your Mail Service
Most email providers create the key pair and give you a record to publish.
Check: You have a selector name and a public key value.
Step 2: Publish the TXT Record
Add the record in DNS, using the selector in the name.
Check: A DNS lookup returns the key.
Step 3: Turn On Signing
Enable DKIM in your mail service.
Check: Outgoing messages include a DKIM-Signature header.
Step 4: Send a Test
Send mail to a test inbox and read the headers.
Check: The result shows dkim=pass.
An Illustrative Example
A business enables DKIM in its mail host and publishes a TXT record at selector1._domainkey. A test message arrives at a mail test tool showing a DKIM pass for the company’s domain.
Myths vs Reality
- Myth: DKIM encrypts email. Reality: It signs messages and doesn’t hide their content.
- Myth: One DKIM key is enough forever. Reality: Keys should be rotated from time to time.
- Myth: DKIM alone stops spoofing. Reality: You also need DMARC to tell receivers what to do.
CTA: Check Your DNS Records
Look up the TXT records for your domain, including DKIM keys. | Check DNS Records | /free-tools/dns-records-checker | teal
Quick Tip
Use a separate selector for each sending service. It makes rotating or removing one key safe.
Mistakes to Avoid
- Publishing a broken key: A stray space can invalidate it.
- Forgetting to enable signing: Publishing the key isn’t enough.
- Reusing one key everywhere: Use selectors.
- Never rotating keys: Plan a schedule.
- Skipping tests: Verify headers after changes.
FAQ
What Does DKIM Stand For?
DomainKeys Identified Mail.
What Is a DKIM Selector?
A label that tells receivers which public key to fetch from DNS.
Where Is the DKIM Key Stored?
In a DNS TXT record.
Can I Have More Than One DKIM Key?
Yes, using different selectors.
How Do I Check DKIM?
Send a test email and read the authentication results in its headers.
Is DKIM Required?
Most providers now expect it, and bulk senders need it for good deliverability.
Where to Go Next
- Sender list: Read about SPF.
- Policy: See DMARC.
- Records: Learn about TXT records.
- Hashing: Compare with SHA-256.
