Inbox check guide
DKIM fail: “body hash did not verify”, “no key for signature” and other DKIM errors, fixed
Reviewed
Short answer
DKIM fails for one of three reasons: the receiver can’t find the public key (wrong selector or the record was never published: “no key for signature”), the message was changed after it was signed (a footer, a rewritten link or a forward: “body hash did not verify”), or the key doesn’t match the signature (a rotated or mistyped key). Check the selector and record first, then look for anything that edits mail in transit.
See which DKIM keys your domain publishes
Read the verdict first
Open a received copy of the message (in Gmail: Show original) and find the Authentication-Results header. The text after dkim= names the failure, and header.d and header.s show the signing domain and selector the receiver tried:
Authentication-Results: mx.example.net;
dkim=fail (body hash did not verify) header.d=yourdomain.com header.s=s1Each error, and what fixes it
| Message | What it means | Fix |
|---|---|---|
| no key for signature / key not found / dkim=permerror | No TXT record at selector._domainkey.yourdomain.com. | Publish the record your provider gives you, under exactly that selector. Check for a CNAME that was never created. |
| body hash did not verify | The message body changed after signing. | Find what edits mail in transit: a mailing-list footer, a security gateway rewriting links, a disclaimer added on the way out. |
| signature verification failed / bad signature | A signed header changed, or the published key isn’t the one that signed. | Re-copy the key from your provider; after a key rotation, wait for the new record before switching. |
| key too short / weak key | The key is 512 or 768 bits; receivers ignore keys under 1024 bits. | Generate a 2048-bit key and publish it under a new selector. |
| dkim=pass but dmarc=fail | The signature is valid but for the provider’s domain (d=provider.com), not yours. | Turn on custom-domain DKIM in the sending service so d= is your domain. |
| dkim=none | The message wasn’t signed at all. | DKIM isn’t switched on for this sending service. |
Selector not found? Where providers put the key
A DKIM key lives at a name chosen by the sending service: selector._domainkey.yourdomain.com. The selector is in the s= tag of the DKIM-Signature header, so you never have to guess it: read it from a real message, then look that name up. Common ones:
- Google Workspace: google (unless you chose another prefix when generating the key)
- Microsoft 365: selector1 and selector2, published as CNAMEs to records Microsoft hosts
- Zoho Mail: the name you chose, often zmail
- Proton Mail: protonmail, protonmail2 and protonmail3 (CNAMEs)
- Fastmail: fm1, fm2 and fm3 (CNAMEs)
- Mailchimp: k2 and k3; SendGrid: s1 and s2 (CNAMEs, created in each service’s domain authentication)
Common record mistakes
- The DNS host added your domain twice: the record ended up at selector._domainkey.yourdomain.com.yourdomain.com. Enter only selector._domainkey as the name.
- A 2048-bit key was pasted with line breaks or quotes from the instructions. The value must be one continuous string (DNS hosts split it into 255-character pieces themselves).
- A CNAME was entered as a TXT record, or proxied through a CDN. DKIM CNAMEs must be plain DNS records.
- The key was published but DKIM signing was never switched on in the provider’s admin panel.
nslookup -type=TXT s1._domainkey.yourdomain.comWhy “body hash did not verify” is often not your fault
DKIM signs a hash of the body. Anything that changes the body afterwards breaks it: mailing lists that add an unsubscribe footer, gateways that rewrite links for scanning, and auto-forwarders that add a banner. If only forwarded or list mail fails, your setup is fine; the intermediary should add ARC headers or rewrite the From: address. If every message fails, look for software on your own side that edits outgoing mail, such as a signature or disclaimer added after signing.
Questions
Does DKIM failing mean my email goes to spam?
Not on its own. DMARC passes if either SPF or DKIM passes and aligns with your From: domain. But SPF breaks when mail is forwarded, so DKIM is what keeps forwarded mail authenticated. Fix it rather than relying on SPF.
How do I find my DKIM selector?
Open any message you sent (Show original in Gmail) and look at the DKIM-Signature header: s= is the selector and d= the domain. The key is then a TXT or CNAME record at selector._domainkey.domain.
Should my DKIM key be 1024 or 2048 bits?
2048 bits where your provider and DNS host support it, which most do. Receivers reject keys shorter than 1024 bits, and 1024-bit keys are considered the minimum.
How often should I rotate DKIM keys?
Many teams rotate every six to twelve months. Publish the new key under a new selector, switch signing to it, and remove the old record a few days later, so mail in flight still verifies.