What Is a DKIM Record? Format, Examples and How to Check It
A DKIM record is a DNS TXT record that publishes the public key receivers use to verify your email signatures. Learn the record format, every tag, real DKIM record examples and how to do a DKIM lookup.

Introduction
DKIM is the part of email authentication that survives forwarding, proves a message was not altered in transit, and is often the only way a third-party sender can pass DMARC for your domain. All of that depends on one DNS record most people never look at.
This guide explains what a DKIM record is, what each part of it means, what real records look like for the common providers, and how to do a DKIM lookup to check yours.
What Is a DKIM Record?
DKIM (DomainKeys Identified Mail, RFC 6376) works with a key pair:
- Your sending service keeps a private key and uses it to sign every outgoing message
- You publish the matching public key in DNS, in the DKIM record
- The receiving server fetches the public key and checks the signature
If the signature verifies, the receiver knows two things: the message was signed by someone holding the private key for your domain, and the signed headers and body were not changed after signing.
The DKIM record is that public key, published as a TXT record.
Where the DKIM Record Lives
A DKIM record is not published on your domain itself. It sits under a name built from a selector:
<selector>._domainkey.<domain>For a domain example.com using Google Workspace, whose default selector is google:
google._domainkey.example.comThe selector lets one domain have several keys at once: one per sending service, or an old and a new key during rotation. Each service tells you which selector it uses.
Anatomy of a DKIM Record
A typical DKIM record looks like this (the key is shortened):
google._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu5f...IDAQAB"It is a list of tag=value pairs separated by semicolons.
| Tag | Required | Meaning |
|---|---|---|
v |
Recommended | Version. If present, must be DKIM1 and come first |
k |
No | Key type. rsa (default) or ed25519 (RFC 8463) |
p |
Yes | The public key, base64-encoded. Empty means the key is revoked |
h |
No | Accepted hash algorithms, for example sha256 |
t |
No | Flags. y = testing mode, s = strict domain matching |
s |
No | Service type. email or * (default) |
n |
No | Notes for humans; ignored by receivers |
In practice, almost every record you see is v=DKIM1; k=rsa; p=.... The interesting part is p.
t=y deserves a warning. It tells receivers the domain is testing DKIM. Some treat signatures from a testing key less strictly, others ignore the flag. Providers sometimes leave it in their default records; remove it once DKIM works.
The Other Half: the DKIM-Signature Header
The record is only half of DKIM. Every signed message carries a DKIM-Signature header that tells the receiver which record to fetch:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=google;
t=1761868800; h=from:to:subject:date:message-id;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=Ht6LVd3sL...| Tag | Meaning |
|---|---|
d= |
Signing domain. The receiver looks up the key under this domain |
s= |
Selector. Combined with d=, gives google._domainkey.example.com |
a= |
Algorithm, usually rsa-sha256 |
c= |
Canonicalization for headers/body. relaxed/relaxed tolerates whitespace changes |
h= |
The headers covered by the signature |
bh= |
Hash of the body |
b= |
The signature itself |
The d= domain matters for DMARC. A signature with d=esp-provider.net can be perfectly valid and still not help your DMARC result, because it does not align with example.com in the From address. For DMARC, you want the signature to carry your own domain.
DKIM Record Examples
TXT record published by you
Google Workspace generates a key and shows you a TXT value to publish:
Name: google._domainkey
Type: TXT
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu5f...IDAQABYou own the record, so key rotation means generating a new key and updating DNS yourself.
CNAME delegated to the provider
Most email platforms ask for CNAME records instead. The CNAME points to a TXT record the provider hosts, so they can rotate keys without asking you:
Name: s1._domainkey.example.com
Type: CNAME
Value: s1.domainkey.u1234567.wl123.sendgrid.netMicrosoft 365 uses two CNAMEs, selector1._domainkey and selector2._domainkey, so it can rotate between them. Amazon SES Easy DKIM uses three CNAMEs with random selectors. The exact values come from each provider's admin panel; copy them from there, not from a blog post.
The Email Services Directory lists the selector and setup steps for the common providers, and the DKIM Setup Guide walks through publishing the record at your DNS host.
A revoked key
To revoke a key, keep the record but empty p:
v=DKIM1; p=Receivers then fail any signature made with that selector. This is cleaner than deleting the record, which looks like a misconfiguration.
How to Do a DKIM Lookup
1. Find the selector
You cannot list a domain's DKIM selectors from DNS. Get the selector from a message you sent: open the headers, find DKIM-Signature, and read s= and d=.
The Email Header Analyzer also helps here: paste the headers and it shows whether DKIM passed for that message, next to the SPF and DMARC results.
2. Query DNS
dig +short TXT google._domainkey.example.comFor a CNAME setup, check both the CNAME and the record it points to:
dig +short CNAME s1._domainkey.example.com
dig +short TXT s1._domainkey.example.comOn Windows:
nslookup -type=TXT google._domainkey.example.comIf you get nothing back, see DKIM Selector Not Found.
3. Check the record
The DKIM Checker fetches the record for a domain and selector, decodes the key and reports its type and length, so you can see at a glance whether it is a valid 2048-bit key.
Common DKIM Record Problems
The domain is doubled. Many DNS panels add your domain to the name automatically. Entering google._domainkey.example.com creates google._domainkey.example.com.example.com. Enter only google._domainkey.
The key is broken across strings. A 2048-bit key is longer than the 255-character limit for a single TXT string, so it must be split into several quoted strings. Some panels do this for you; others need you to paste it as-is. Spaces or line breaks added inside the key break it.
The key is truncated. Copying from a narrow admin panel sometimes cuts the end of p=. A valid RSA key from most providers ends in IDAQAB.
The key is too short. Keys under 1024 bits are considered insecure. Use 2048-bit RSA, as RFC 8301 recommends.
DKIM was never switched on. Publishing the record is not enough with some providers; Microsoft 365, for example, needs signing enabled after the CNAMEs are in place. The record exists but no message is signed with it.
The signature verifies but DMARC still fails. The message is signed with the provider's domain (d=esp-provider.net), not yours. Set up custom DKIM for your domain in the provider's settings. DKIM Signature Invalid and DMARC Alignment Failed cover the variations.
Rotating DKIM Keys
Keys should not live forever. A safe rotation with selectors looks like this:
- Publish a new key under a new selector (
google2._domainkey, for example) - Switch your sending service to sign with the new selector
- Wait several days, so messages still in transit can be verified with the old key
- Revoke the old key with an empty
p=
Providers that use CNAME delegation do all of this for you.
Checklist
- Every service that sends as your domain signs with DKIM
- Each signature uses
d=with your domain, not the provider's - Records resolve at
selector._domainkey.yourdomain - Keys are 2048-bit RSA
-
t=yis removed once DKIM works - Old keys are revoked, not left active
Next Steps
- Look up and decode a DKIM record: DKIM Checker →
- Publish a record at your DNS host: DKIM Setup Guide →
- Find the selector in a real message: Email Header Analyzer →
- See which senders sign with your domain: Start free → — DMARC aggregate reports show DKIM results and signing domains per source, so you can tell which services still sign with their own domain.
Related Articles:
Ready to improve your email deliverability?
Start monitoring your DMARC reports and get insights into your email authentication setup.
Start Free TrialRelated Articles
getting startedSPF Record Syntax Explained, With Examples
A complete reference to Sender Policy Framework syntax: every mechanism, qualifier and modifier, how receivers evaluate an SPF record, and copy-ready SPF record examples for common setups.
getting startedSPF, DKIM, and DMARC: The Complete Email Authentication Guide
Master email authentication with this comprehensive guide to SPF, DKIM, and DMARC. Learn how these protocols work together to secure your email delivery.
getting startedDMARC Record Examples: 10 Ready-to-Use TXT Records
Copy-ready DMARC TXT record examples for monitoring, quarantine, reject, subdomains, parked domains and external reporting, with every tag explained under RFC 9989 and how to do a DMARC lookup.