What a DKIM record is
DKIM (RFC 6376) lets the sending server sign each message with a private key. The receiver reads the DKIM-Signature header, takes the selector (s=) and domain (d=), fetches the public key from DNS, and verifies the signature.
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=s2026; ...
The verifier fetches the TXT record at s2026._domainkey.example.com:
s2026._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQAB"
A domain can have any number of selectors, one per sending service or key generation, which is how you rotate keys without downtime.
How to read the result
| Tag | What it means |
|---|---|
v | Version. Optional, but if present it must be DKIM1 and come first. |
k | Key type: rsa (default) or ed25519 (RFC 8463). |
p | Public key in base64. Empty means revoked. |
t | Flags: y means testing, s means the i= domain must equal d= exactly. |
h | Allowed hash algorithms. If present it needs to include sha256. |
s | Service type: * or email. |
The checker decodes p= to read the RSA modulus, so the reported key size comes from the key itself, not from a guess based on its length.
Common failures and how to fix them
No record at the selector. Either the selector is wrong or the record was never published. Check the s= value in a real signature. Some providers (Microsoft 365, many email services) ask you to publish a CNAME instead of a TXT record; the checker follows CNAMEs and tells you where the key really lives.
selector1._domainkey.example.com. CNAME selector1-example-com._domainkey.example.onmicrosoft.com.
Key truncated or mangled. Web DNS panels sometimes cut long values, or keep the quotes you pasted. If p= does not decode to a valid key, compare it character by character with what your provider gave you. A 2048-bit key is about 400 base64 characters. It has to be split into strings of up to 255 characters, which are joined without spaces:
s2026._domainkey TXT ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
"...rest of the key...IDAQAB" )
1024-bit key. Generate a 2048-bit key under a new selector, publish it, switch signing, and remove the old record after a few days, once messages in flight have been verified.
t=y left on. Testing mode lets verifiers ignore failures. It is meant for initial setup only.
h=sha1. RFC 8301 retired SHA-1 for DKIM. Remove h= (the default allows sha256) or set h=sha256.
Empty p= on a live selector. Someone revoked the key, or the provider rotated it and your mail server still signs with the old one. Republish the current key or point signing at the active selector.
DKIM and DMARC
For DMARC, a DKIM pass only counts when the signature's d= domain aligns with the From domain. A message signed only by your email provider (d=esp-mail.net) passes DKIM but not DMARC. Set up a custom DKIM domain with your provider so it signs as d=example.com, then confirm it by sending a message and reading Authentication-Results (look for dkim=pass header.d=example.com).