Guide
DKIM DNS record: name, tags and TXT vs CNAME
A DKIM record is a DNS record at <selector>._domainkey.<domain> that holds the signer’s public key as tag=value pairs. You publish it as a TXT record you create, as Google Workspace has you do, or as a CNAME to a TXT record the provider hosts, as Microsoft 365 does. A receiver builds the name from the d= and s= tags of the message’s signature.
Three checks are easy to blur. The record exists, this message’s signature verifies, and the signing domain aligns with the From domain. This page covers the first only. What is DKIM explains all three. Sources were checked on 29 October 2026.
A DKIM record, annotated
A key record is a list of tag=value pairs separated by semicolons. Only p=, the public key, is required. v= is recommended, and for it RFC 6376 adds: “This tag MUST be the first tag in the record.”
v=DKIM1 is the version and k=rsa the key type. p= is the public key in base64.v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A...Where the record lives
The name is the selector, then _domainkey, then the signing domain. RFC 6376 says: “All DKIM keys are stored in a subdomain named "_domainkey".” It also says: “Periods are allowed in selectors and are component separators.”
foo.bar._domainkey.example.com
foo.bar selector (s=)
_domainkey fixed label
example.com signing domain (d=)TXT or CNAME
Both are used, and the provider you sign with decides. Google Workspace has you publish the key as a TXT record. Microsoft 365 has you publish CNAME records that point at keys Microsoft hosts.
| Provider | Record | What the vendor says |
|---|---|---|
| Google Workspace | TXT | “The record type is TXT.” |
| Microsoft 365 | Two CNAMEs | “The CNAME records point to the corresponding public keys that are used to verify the DKIM signature.” |
A TXT record in place of those CNAMEs means managing keys and rotation by hand, which Microsoft says is not supported for Microsoft 365. RFC 1034 describes the mechanism: a name server that finds a CNAME restarts the query at the CNAME’s target.
dkim.fyi makes one TXT lookup at the name and follows a CNAME chain if there is one. The DNS panel lists the hops in order. The last hop is the name that holds the TXT record, which the Record panel shows. mailchimp.com k1 and sendgrid.net s1 are both CNAMEs, and neither record has a v= tag. How to set up DKIM links the provider pages.
The tags
RFC 6376 defines seven tags for a key record.
| Tag | Holds | Status | Default | Example |
|---|---|---|---|---|
v= | The record version. Must be the first tag if present. | Recommended | DKIM1 | v=DKIM1 |
k= | The key type. | Optional | rsa | k=ed25519 |
p= | The public key in base64. Empty means revoked. | Required | None | p=MIIB... |
t= | Flags, separated by colons: y for testing, s for strict. | Optional | No flags | t=y |
s= | Service types the key applies to: * for all, or email. | Optional | * | s=email |
h= | Hash algorithms the key may be used with. | Optional | All allowed | h=sha256 |
n= | A note for a person. No program interprets it. | Optional | Empty | n=retired |
The Record panel in the DKIM checker and record lookup lists the tags the record has, in the order v, k, h, p, s, t, n. A missing k= does not display rsa. dkim.fyi reports an error for an h= of sha1 alone, and RFC 8301 says: “rsa-sha1 MUST NOT be used for signing or verifying.” It also reports an error for an s= that lists neither * nor email.
Live records exist with h=sha256 (dreamhost.com dreamhost) and with t=s (sendgrid.net s1). No live record with t=y or a restricted s= was found on 28 October 2026, so none is linked.
RSA and Ed25519 keys
k= defaults to rsa, so a record without it holds an RSA key. RFC 8463 says: “The DNS record for the verification public key has a "k=ed25519" tag to indicate that the key is an Ed25519 rather than an RSA key.” It also says: “Since the key is 256 bits long, the base64 text is 44 octets long.” dkim.fyi reports such a key as 256 bits and strong, with the finding “The key is a valid Ed25519 key (RFC 8463).”
v=DKIM1; k=ed25519; p=<44 base64 characters>RFC 8301 section 3.2 requires signers to use keys of at least 1024 bits and adds: “Signers SHOULD use RSA keys of at least 2048 bits.” dkim.fyi rates 2048 bits and up as strong, 1024 to 2047 as acceptable with a warning, and anything below 1024 as an error. The two pages are RSA key between 1024 and 2047 bits and RSA key under 1024 bits.
Revoked, testing and strict records
Three settings change how receivers treat a key.
- What does an empty p= mean?
The key is revoked. RFC 6376: “An empty value means that this public key has been revoked.” dkim.fyi gives the verdict “Revoked”. fastmail.com fm1 is a live example, and the Fastmail page warns that which of its selectors are empty may change. See DKIM key revoked: p= is empty.
- What does t=y mean?
The domain says it is testing. RFC 6376 defines the flag as “This domain is testing DKIM.” and adds: “Verifiers MUST NOT treat messages from Signers in testing mode differently from unsigned email, even should the signature fail to verify.” When the key is otherwise valid, dkim.fyi gives a record with this flag the verdict “Testing”. A revoked key or an error in the record still gives “Revoked” or “Invalid”. See DKIM record in testing mode (t=y).
- What does t=s mean?
Signatures that carry an
i=tag must use the same domain asd=. RFC 6376: “That is, the "i=" domain MUST NOT be a subdomain of "d=".” It adds: “Use of this flag is RECOMMENDED unless subdomaining is required.” sendgrid.net s1 has it.
Long keys in several strings
A 2048-bit RSA key does not fit in one DNS character-string, so the record holds it in two or more quoted strings and receivers join them. Google says: “You can not enter a 2048-bit key as a single text string with a 255-character TXT record limit.” RFC 1035 words the limit another way: “<character-string> is treated as binary information, and can be up to 256 characters in length (including the length octet).” A TXT record may hold one or more of them. RFC 6376 says how receivers read the result: “Strings in a TXT RR MUST be concatenated together before use with no intervening whitespace.”
"v=DKIM1; k=rsa; p=MIIBIjANBgkq...(first string)" "...(second string)"On 29 October 2026 fastmail.com fm2 was two strings of 255 and 155 characters, and mandrillapp.com mte1 was two of 183 and 228.
Check a record
Enter the domain and selector in the checker and read what it shows against the tag table above.
- Get the selector and the signing domain from the
s=andd=tags of a message’s signature. Without a message, try the DKIM selector finder or read Find a DKIM selector without an email header. - Open the DKIM checker and record lookup, enter both and read the Record, Key and DNS panels. A CNAME chain, if there is one, is in the DNS panel. For a domain you do not control, Check DKIM for a domain you do not control covers the limits.
- Run
dig +short TXT <selector>._domainkey.<domain>to see the strings as DNS returns them. The checker can serve an answer up to five minutes old.
Try it
Sources
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- RFC 8463: A New Cryptographic Signature Method for DomainKeys Identified Mail (DKIM)
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM)
- RFC 1035: Domain Names - Implementation and Specification
- RFC 1034: Domain Names - Concepts and Facilities
- How to use DKIM for email in your custom domain (Microsoft Learn)
- Set up DKIM (Google Workspace Help)
- Troubleshoot DKIM issues (Google Workspace Help)