Guides
DKIM fail: body hash and signature errors
12 November 2026
DKIM fails for one of two reasons. Either the receiver could not get a usable public key from your DNS, or the message changed after it was signed. The header tells you which. "Body hash did not verify" means the message was altered on the way, usually by a gateway, a footer, or a mailing list. "Key not found" or a lookup error means the DNS record is missing, misnamed, revoked, or cut short. A third case looks like a pass but is not: DKIM passed, but on someone else’s domain.
The DNS side of this is what a $129 Snapshot checks: which DKIM selectors your domain publishes, and whether each key parses. The message side you can test yourself with the steps below.
How DKIM verification works, briefly
The sending server signs the message with a private key and adds a DKIM-Signature header. That header names the signing domain (d=), the selector (s=), and a hash of the message body (bh=). The receiver looks up the public key at selector._domainkey.domain, the naming pattern in RFC 6376 section 3.6.2.1, then checks two things:
- Does a hash of the body it received match
bh=? - Does the signature over the headers verify with the public key?
If the key cannot be found or read, or either check fails, DKIM fails. Find the result in the Authentication-Results header. Our guide to reading email headers shows where.
Failure 1: body hash did not verify
The body the receiver got is not the body that was signed. Google’s DKIM troubleshooting page says this result means the message was modified in transit, and points to outbound gateways that add footers or make other changes.
Common causes:
- A footer or disclaimer added after signing. A security gateway, a legal disclaimer tool, or an email signature service that sits after the mail server.
- A mailing list that adds a footer or a subject tag.
- Forwarding through a service that rewrites content, such as link rewriting.
- A tool that reformats the message, changing line endings or encoding.
Fix: make sure signing happens last. If a gateway changes outgoing mail, either have it stop, or have the gateway do the DKIM signing itself. For lists and forwarders you do not control, DKIM failure is expected. That is why DMARC accepts SPF or DKIM, and why ARC exists for forwarders that want to vouch for mail they changed.
Google also says not to use the DKIM l= length tag if you send through a non-Google system. It limits how much of the body is signed, which lets someone append content to a signed message.
Failure 2: no key found
The receiver looked up selector._domainkey.yourdomain.com and got nothing. Check:
- The selector. Read
s=from theDKIM-Signatureheader and look up exactly that name:dig TXT s._domainkey.example.com +short, ordig CNAMEif the provider uses CNAMEs. - The name in DNS. Hosts that add your domain automatically turn a full name into
google._domainkey.example.com.example.com. - The provider’s activation step. Google Workspace needs Start authentication. Microsoft 365 needs signing turned on after the CNAMEs are found. A provider that signs before DNS is ready produces this failure. See Google Workspace DKIM not authenticating.
- A proxied CNAME at Cloudflare. Set DKIM CNAMEs to DNS only.
- A deleted record. Someone cleaned up DNS and removed a selector that is still in use.
The DNS steps are in our guide to adding a DKIM record.
Failure 3: the key is there but unusable
The record exists, but the receiver cannot use it.
- Truncated key. Google’s troubleshooting page says a key can be truncated or have its parts out of order at the DNS host. Compare the start and end of the published
p=value with what the provider shows. - Split wrongly. A 2048-bit key published as two separate TXT records instead of two strings in one record. RFC 6376 section 3.6.2.2 says strings in one TXT record are joined with no space between them. Separate records are not joined.
- Revoked key. Section 3.6.1 says an empty
p=value means the key has been revoked. If you seep=with nothing after it, the provider or an admin retired that selector, and mail still signed with it will fail. - Wrong version tag. Section 3.6.1 says
v=, if present, must beDKIM1and must be the first tag. - Stray characters. Literal quote marks, spaces, or line breaks pasted into the key.
- An old key. The provider generated a new key, and DNS still has the previous one.
Failure 4: pass on the wrong domain
This one does not show as a failure in the DKIM result. The header says dkim=pass, but header.d or header.i shows the platform’s domain, not yours. DKIM passed for them. DMARC will still fail for you, unless SPF passes on an aligned domain.
Fix: set up the platform’s custom domain authentication so it signs with your domain. See the platform guides for Mailchimp and Klaviyo, HubSpot, and SendGrid.
Failure 5: too many signatures
Google’s troubleshooting page says Gmail checks only the first five DKIM signatures. If a chain of gateways each adds a signature, yours can fall outside the set Gmail looks at. Remove signing from systems that do not need it.
Temporary errors
A temperror result means the key lookup failed at that moment, often a DNS timeout. One temporary error is not a broken record. If you see them often in DMARC reports, check that your DNS host is answering reliably.
A quick way to tell which failure you have
- Open the full headers of a message that failed.
- Read the DKIM result and any reason in brackets beside it.
- If it mentions the body hash, look for something that changed the message after signing.
- If it mentions the key or a lookup, read
s=andd=from the signature and look up that exact name. - If it passed, check the domain beside the pass.
Then send a fresh test and confirm dkim=pass with your own domain.
Why DKIM is worth the trouble
SPF breaks when mail is forwarded, because the forwarder’s IP is not in your record. DKIM survives plain forwarding, because the signature travels with the message. For most third-party senders it is also the easiest way to get an aligned pass for DMARC. Gmail and Yahoo require it of bulk senders, and Microsoft requires it of high-volume senders to Outlook.com.
Sources
- RFC 6376: DKIM: sections 3.6.1 (key tags, empty p= means revoked), 3.6.2.1 (selector._domainkey), 3.6.2.2 (joining TXT strings)
- Google Workspace: Troubleshoot DKIM issues (body hash, truncated keys, five signatures, l= tag)
- Google: Email sender guidelines FAQ
- Microsoft: Outlook.com postmaster policies