Why You Are Here
Your mail is showing dkim=fail and you need to know why. Authentication headers report a failure, or DMARC reports show DKIM not passing, and the cause is rarely obvious from the record alone.
You have just set up DKIM and want to confirm it published. After adding a selector record, checking it resolves correctly is the immediate next step, particularly since long keys are frequently truncated by DNS panels.
You are checking key strength. Older setups commonly still use 1024-bit keys, which major receivers now treat with suspicion.
What This Tool Does
The DKIM Checker looks up the DKIM record published at a given selector and validates it.
Enter a domain and a selector and the tool retrieves the record from selector._domainkey.yourdomain.com, reports the key type and length, and flags syntax or truncation problems.
Selectors Cannot Be Enumerated
This is the structural difference between DKIM and the other authentication records, and it explains the most confusing result this tool can give.
SPF and DMARC live at fixed addresses. SPF is at the domain root. DMARC is at _dmarc.yourdomain.com. A checker always knows where to look.
DKIM records live at an address you choose
The format is selector._domainkey.yourdomain.com, where the selector is any label your provider picked. There is no DNS mechanism for listing what exists beneath _domainkey. So auto-discovery is guessing. Every tool offering it, including this one, tries a dictionary of selectors that providers commonly use, and reports whatever it finds.
|
Provider |
Common selectors |
|
Google Workspace |
|
|
Microsoft 365 |
selector1, selector2 |
|
Mailchimp |
k1, k2 |
|
SendGrid |
s1, s2 |
|
Amazon SES |
Randomly generated |
|
Zoho |
zoho, zmail |
Amazon SES is the clearest illustration
Its selectors are randomly generated strings, so no dictionary will ever contain them. A domain using SES has perfectly valid DKIM that no auto-discovery tool can find.
Therefore a not-found result means one of two things
Either no DKIM record exists, or the checker did not guess your selector. Those are very different situations and the tool cannot distinguish between them.
How to find your actual selector
Open a message you have sent, view the full headers, and read the s= value in the DKIM-Signature line. That is authoritative. Your provider's admin console will also show it.
Reading a DKIM Record
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
|
Tag |
Meaning |
|
v=DKIM1 |
Version, always this value |
|
k= |
Key type, rsa or ed25519 |
|
p= |
The public key itself, Base64 encoded |
|
t=y |
Testing mode, receivers should not act on failures |
|
h= |
Permitted hash algorithms |
An empty p= value revokes the key
This is how a selector is retired without deleting the record, which tells receivers the key is deliberately withdrawn rather than accidentally missing.
t=y means the record is in testing
Receivers are told not to treat failures as meaningful. Setups sometimes go live with this left in place, which quietly removes DKIM's value entirely.
Key Length
|
Key length |
Position |
|
Under 1024 bits |
Rejected by verifiers |
|
1024 bits |
Accepted, but flagged as weak by major receivers |
|
2048 bits |
Current standard |
|
4096 bits |
Supported, but some DNS providers struggle with the size |
RFC 8301 requires a minimum of 1024 bits and recommends 2048. Google warns about 1024-bit keys in Postmaster Tools, and some receivers reduce the trust weighting of signatures made with them.
2048 bits is the right answer for new setups
4096 is not meaningfully better in practice and creates DNS record size problems that 2048 mostly avoids.
You can estimate key length from the record
A 1024-bit key produces a p= value of roughly 216 Base64 characters; a 2048-bit key produces roughly 392. A visibly short key is a 1024-bit key.
The 255-Character Problem
A DNS constraint that produces a specific and misleading failure, and one where common advice is wrong. A single DNS TXT string cannot exceed 255 characters, and a 2048-bit key exceeds that.
The correct solution is splitting the value across multiple quoted strings within one record
mail2026._domainkey.example.com TXT ( "v=DKIM1; k=rsa; " "p=MIIBIjANBgkqhkiG9w0B..." "...AQEFAAOCAQ8AMIIBCgKC" )
Receivers concatenate the strings back together. Most DNS providers handle this automatically when you paste a long key, but not all do.
Some published advice suggests using a 1024-bit key so the value fits in one string. Do not do this
It trades key strength for a formatting convenience that has a proper solution. The result is a weaker key that major receivers already flag.
The failure mode when splitting goes wrong is truncation
The record publishes, resolves, and looks present, but the key is incomplete, so every signature fails verification. Comparing the published key length against what your provider generated is the check that catches it.
Why DKIM Fails
|
Symptom |
Cause |
Can you fix it? |
|
No DKIM-Signature header at all |
DKIM not enabled at the provider |
Yes |
|
dkim=permerror, no key found |
Selector mismatch, or DNS not propagated |
Yes |
|
Key in DNS does not match signature |
Rotation done in the wrong order |
Yes |
|
Invalid public key |
Record truncated at 255 characters |
Yes |
|
Body hash did not verify |
Message modified after signing |
OFTEN NOT |
|
dkim=neutral (bad format) |
Line breaks corrupted the record |
Yes |
Body Hash Mismatch
DKIM signs a hash of the message body
If anything alters the body in transit, the hash no longer matches and verification fails.
|
Causes you CAN fix |
Causes you CANNOT fix |
|
Your own server appending a footer after signing |
A mailing list appending its own footer |
|
A security gateway rewriting links post-signature |
A recipient's forwarding service adding a banner |
|
Content encoding changed in your own pipeline |
An intermediate system reformatting the message |
This is inherent rather than a misconfiguration
A mailing list that modifies messages will break DKIM for every sender who uses it, and there is nothing at your end to correct.
It is also why DMARC accepts SPF OR DKIM rather than requiring both
DKIM survives forwarding but breaks on modification. SPF survives modification but breaks on forwarding. Between them, most legitimate mail passes one or the other.
Canonicalization affects tolerance
The simple mode fails on any change including whitespace; relaxed tolerates minor reformatting such as line-wrapping changes. Most providers default to relaxed for this reason, and it is the sensible choice.
Rotating Keys Without Breaking Mail
Rotation limits exposure if a private key is compromised, and the ordering matters more than the frequency.
Never overwrite an existing selector's key
Messages signed with the old key may still be in transit, and they will fail verification the moment the DNS record changes.
-
Generate a new key pair
At 2048 bits.
-
Publish the public key under a NEW selector
Leave the existing selector untouched.
-
Wait for DNS propagation
Confirm the new selector resolves correctly before going further.
-
Switch your provider to sign with the new selector
-
Leave the old selector published
For long enough that any message signed with it has been delivered. A few days is ample.
-
Revoke the old selector
By setting p= to an empty value, rather than deleting the record.
Multiple Selectors Are Correct
A useful contrast with the other authentication records.
|
Record |
How many |
|
SPF |
Exactly one per domain |
|
DMARC |
Exactly one per domain |
|
DKIM |
One per sending service |
Every service that sends on your behalf should have its own key and its own selector
Google Workspace, your marketing platform, your helpdesk, your invoicing system, each signing with its own key. This is a security property rather than a formality. If one provider's key is compromised, only that provider's mail is affected, and revoking it does not disturb anything else.
Common Mistakes to Avoid
A checker that cannot find a DKIM record has usually failed to guess your selector, since selectors cannot be enumerated from DNS. Providers using randomly generated selectors, Amazon SES among them, will never be found by dictionary-based discovery. Read the s= value in the DKIM-Signature header of a message you have sent to find your actual selector, then check that specifically.
A 2048-bit key exceeds the 255-character limit for a single DNS string, and some published advice suggests using a 1024-bit key to avoid the problem. This trades a security property for a formatting inconvenience that has a correct solution: split the value across multiple quoted strings within the same record. Major receivers already flag 1024-bit keys as weak, so this is the wrong trade in both directions.
Messages signed with the old key remain in transit for some time after you change DNS, and overwriting the record makes all of them fail verification. Publish the new public key under a new selector first, confirm it propagates, switch signing to it, and leave the old selector live for several days before revoking it with an empty p= value.
Quick Reference
|
Item |
Detail |
|
Record location |
selector._domainkey.yourdomain.com |
|
Selectors |
Cannot be listed from DNS |
|
Auto-discovery |
Is dictionary guessing |
|
Not found |
May mean wrong selector |
|
Find yours |
In the s= tag of a sent message |
|
Standard |
2048-bit keys |
|
1024-bit keys |
Flagged as weak |
|
255-character limit |
2048-bit keys exceed it |
|
Correct fix |
Split across quoted strings |
|
Truncation |
Resolves but fails every signature |
|
Body hash failure |
Means the message changed |
|
Mailing list footers |
Break DKIM, unfixably |
|
Rotation |
New selector, never overwrite |
|
Selectors per domain |
One per sending service |
