CertaDNS
Skip to lesson

The Key Record · lesson 1 of 3

Anatomy of a key record

After this lesson you can

Read every tag in a DKIM key record and say what each one permits or forbids.

Assumes you have read DKIM-Signature, tag by tag.

A DKIM key record is a TXT record at <selector>._domainkey.<domain>. It is a short tag list, and three of its tags do something more than carry the key.

The shape of one

google._domainkey.certadns.com IN TXT
v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAtG/KAL73Y8YL0OaDHYuN2F1FMP6fUbCeQ5hO...
Checked 2026-09-15. Truncated; the real p= runs to 392 characters.

Every tag

TagMeaningIn practice
v=VersionAlways DKIM1. Optional, but if present it must come first.
k=Key typersa or ed25519. Defaults to rsa.
p=Public keyBase64 DER. Empty means revoked.
t=Flagsy = testing, s = strict i= matching. Colon-separated.
h=Permitted hashesRestricts which algorithms may be used with this key.
s=Service typeemail or *. Nobody sets it.
n=NotesFree text, for humans. Verifiers ignore it.

The two flags that matter

t=y marks the key as being tested. Receivers are told to treat a signature made with it as though it were unsigned — so the signature verifies, and then counts for nothing. A key left in testing mode after go-live is a domain with DKIM configured, working, and entirely without effect. It is a genuinely common and genuinely invisible failure.

t=s requires the i= identity in the signature to be the exact domain in d=, not a subdomain of it. SendGrid sets it on its customer keys:

$ dig +short TXT s1._domainkey.github.com
s1.domainkey.u51742174.wl175.sendgrid.net.
"k=rsa; t=s; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyn3fMCVpb7ry..."
Checked 2026-09-15. github.com delegates s1 to SendGrid, which publishes the key.

Two things are visible in that answer beyond the flag. The record is reached through a CNAME — the domain does not hold this key itself — and it has no v=DKIM1 at all. Omitting v= is legal and widespread; a verifier that rejected it would fail on a large slice of real mail.

Query the selector, not the domain

dig TXT example.com will never show you a DKIM key. The record lives at <selector>._domainkey.example.com, and you have to know the selector to ask for it — which is the subject of the selectors module.

Long records and TXT strings

A 2048-bit key exceeds the 255-octet limit on a single TXT character-string, so the record is published as several strings that the resolver concatenates with nothing between them. RFC 6376 §3.6.2.2 requires exactly that. The quoting is a DNS detail, not part of the key — a space accidentally introduced between the strings breaks the key, which is why hand-editing a long record in a provider UI is worth double-checking with a query afterwards.

Try it on a real domain

Free, no account, public DNS only.

Last reviewed