DKIM checker
Enter a domain and, if you know it, the selector. Without one, the common selectors of Google, Microsoft, Proton, Zoho, Mailchimp and others are tried.
Finding the selector
Every DKIM signature names its selector in the s= tag of the DKIM-Signature header. Send yourself a message, open its headers and look for s=, or paste them into the header analyzer.
What DKIM does
DKIM signs every outgoing message with a private key. The matching public key sits in DNS at selector._domainkey.your-domain, so receivers can check that the message was not changed and really comes from your domain.
Use RSA keys with 2048 bits, publish one selector per sending service and remove old selectors only after no mail is signed with them any more.
From the header to the DNS record
The selector in s= is only half of the key's address. The other half is the signing domain in d=:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
s=s2026; h=from:to:subject:date; bh=…; b=…
The receiver combines them into s2026._domainkey.example.com and fetches the public key from there. So enter the domain from d= in the checker, which is not always the one in the "From". If d= holds the domain of your sending service, DKIM passes but does not align with your sender for DMARC.
Look at a= as well: since RFC 8301, receivers must not accept signatures made with rsa-sha1. It should say rsa-sha256.
How DKIM works together with SPF and DMARC is covered in SPF, DKIM and DMARC explained.
What the key record contains
s2026._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…IDAQAB"
v=DKIM1is recommended but not required. If present, it must be the first tag.k=names the key type. Without it,rsaapplies; the other option ised25519(RFC 8463). Not every receiver can verify Ed25519 yet, so it usually comes as a second signature next to RSA.p=holds the public key in Base64. An emptyp=means the key has been revoked, and every signature with this selector fails.t=ymeans the domain is still testing DKIM. Receivers must not treat such mail differently from unsigned mail, even if the signature fails.
Key length and long records
RFC 8301 requires RSA keys of at least 1024 bits and recommends 2048. Receivers must not accept shorter keys. You can often tell the length from the first characters: in Base64, a 1024-bit key usually starts with MIGf, a 2048-bit key with MIIBIj.
A 2048-bit key is almost 400 characters long in Base64, but a single string in a TXT record can hold at most 255 characters. The key is therefore split into several strings within the same record, which the receiver joins without spaces:
s2026._domainkey.example.com. TXT ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…"
"…IDAQAB" )
Many DNS panels split long values on their own. Two separate TXT records with half the key each, on the other hand, do not make a valid key.
Selectors and key rotation
Whoever signs picks the selector. Google Workspace uses google by default, and you add the TXT record yourself. Microsoft 365 uses selector1 and selector2, which you set up as CNAME records pointing to Microsoft. That way the key can change without you touching your DNS. Many sending services work with CNAMEs in the same way.
To rotate a key of your own:
- Publish a new key pair under a new selector, such as
s2027. A year in the name makes it easier to keep track. - Check the new selector here to make sure the key can be fetched.
- Switch signing over.
- Leave the old key in place for a few days, so mail still on its way can be verified.
- Retire the old record, with an empty
p=or by deleting it.
How to read the result
Without a selector, the checker tries the usual names of large providers and shows every key it finds:
- "Key found at …" with type and length, such as "RSA, 2048 bits": all good.
- "The key at … has 1024 bits" is a warning. It works, but it is weak.
- "… is too short" is an error: receivers ignore the key.
- "… cannot be read":
p=does not hold a valid key. Often a piece went missing while copying, or quotation marks ended up inside. - "… is revoked": an empty
p=. For an old selector, that is intended. - "… is in test mode (t=y)": remove
t=yonce signing works.
If the common names find nothing, the "Tried" line lists them. Possible reasons:
- A custom selector: many services use names with a date or random characters. Enter the value from
s=. - A different domain: if the service signs with
d=mail.example.com, the key sits under that subdomain. - A CNAME to nowhere: the selector points to the provider, but no key is active there yet.
- A doubled domain: the DNS panel appended the domain on its own, and the record ended up at
s2026._domainkey.example.com.example.com.
A key in DNS does not yet mean your mail is signed correctly. Only a real message shows that, for example in the mail tester.
Common questions
Why does DKIM fail on mailing lists?
Plain forwarding leaves the signature intact. Mailing lists, however, often change the subject or add a footer. Because the body and usually the subject are signed, the signature no longer matches afterwards. That is why many lists put their own address in the "From" or sign the message again themselves.
The key is there, but the header says dkim=fail. Why?
Often the key in DNS does not match the one your service signs with, for example after you generated a new one. Or the record is cut off because the DNS panel only accepted 255 characters. And some servers change messages after signing, for example by appending notices.