Guides / DKIM "body hash did not verify": what it means and how to fix it
DKIM "body hash did not verify": what it means and how to fix it
If a message header shows dkim=fail (body hash did not verify), your DKIM key and DNS record are usually fine. The signature failed because the body the receiver got is not the body your server signed: something changed it on the way. That is a different problem from a missing or wrong DKIM key, and changing DNS won't fix it. This guide explains what the error means, the usual causes for cold email senders (footers, gateways and forwarding), how to find the hop that changed the message, and how to fix it. Run the free checker above on your sending domain first, so you know the DKIM record itself is published and readable.
What "body hash did not verify" means
A DKIM signature carries two things: a hash of the message body in the bh= tag, and a signature over the headers (including that body hash) in the b= tag. The DKIM standard, RFC 6376, tells the receiver to recompute the hash of the body it actually received and compare it with bh=. Section 6.1.3 says that if the hash does not match, the verifier should ignore the signature and return PERMFAIL (body hash did not verify).
So the message was signed, the receiver found your public key, but the body had changed since signing. If the headers had changed or the key didn't match instead, the result would be signature did not verify, which points at a different set of causes.
Why even small changes break it
Before hashing, DKIM normalizes the body with one of two canonicalization methods named in the c= tag. RFC 6376 describes simple as tolerating almost no modification: it only ignores empty lines at the end of the body. relaxed also ignores whitespace at the ends of lines and collapses runs of spaces and tabs into one space. Neither method tolerates added or changed text, so a footer, a rewritten link or a re-encoded attachment changes the hash and the signature fails.
If no c= tag is present, the default is simple/simple, the strictest setting.
Common causes for cold email senders
- A footer or disclaimer added after signing: Google's DKIM troubleshooting guide calls this out: some outbound gateways add a footer to every outgoing message, which changes the content after the message was signed and causes DKIM to fail.
- An outbound security or compliance gateway: a relay that handles mail after your provider signs it and edits the body on the way, for example by adding banners or rewriting links. Any change to the body bytes after signing breaks the body hash.
- Forwarding: Google notes that forwarded messages can fail DKIM even when DKIM is set up correctly, depending on how the forwarding server handles the message. Mailing lists that add a footer or subject tag have the same effect.
- A second sending tool in the chain: If one platform signs the message and then hands it to another service that inserts tracking pixels, unsubscribe text or a signature block, the first signature no longer matches.
How to find the hop that changed the message
- Send a test from your normal setup to a personal Gmail address you control. In Gmail, open the message, choose More, then Show original.
- Find the
Authentication-Results:header. If the dkim entry saysbody hash did not verify, Google's guide says the message was modified during transit. - Look at the
d=domain ands=selector in eachDKIM-Signature:header to see who signed it, and at theReceived:lines to see every server it passed through after that. - Compare the body you wrote with the body you received. A footer, banner, changed link or extra tracking line tells you which system added it.
- Repeat with the gateway, footer rule or second tool turned off. If DKIM then passes, you have found the cause. Google's Admin Toolbox Messageheader tool can also read the headers for you.
How to fix it
- Change the order, not the key: Whatever modifies the body has to run before the message is signed. Add footers and disclaimers in the sending platform itself, or have the gateway that adds them sign the message as the last step.
- Stop edits after signing: Turn off link rewriting, banners or body rules on any relay that handles mail after your provider has signed it, or exempt your outbound campaign mail from them.
- Use relaxed canonicalization where you control signing: set
c=relaxed/relaxed. It absorbs whitespace and line-wrapping changes, but not added text, so it is not a fix for footers. - Don't use the
l=body length tag: It limits the signature to the first part of the body so later additions still pass, but Google's guide says not to use it because messages using it are vulnerable to abuse, citing section 8.2 of RFC 6376. Fix the modification instead. - Keep the number of signatures small: Google's guide says Gmail checks only the first 5 DKIM signatures on a message; if the one that would pass isn't among them, the message fails DKIM and may fail DMARC.
Why it matters for cold email
DMARC passes only when SPF or DKIM passes and aligns with the From domain. Many sending platforms use their own bounce domain, so DKIM is often the only aligned check a cold email has. When the body hash fails, DMARC can fail with it, and with a quarantine or reject policy the message goes to spam or bounces even though your DNS looks perfect. See why SPF and DKIM pass but DMARC fails for the alignment side, and your DMARC aggregate reports for how often DKIM is failing across receivers.
Keep it from happening again
Re-test DKIM with a real message whenever you add a gateway, footer rule, signature tool or new sending platform, because none of those show up in a DNS check. OutboxWatch watches SPF, DKIM, DMARC, MX and blocklists on your sending domains every day, so the records stay right while you check the message path whenever it changes.
Frequently asked questions
Does "body hash did not verify" mean my DKIM record is wrong?
Usually not. It means the receiver found your key and the signature, but the body it received doesn't match the hash in the bh= tag, so the body changed after signing. A wrong or missing key produces different errors, such as signature did not verify or no key for signature.
What is the difference between body hash did not verify and signature did not verify?
RFC 6376 has the receiver check the body hash first: a mismatch returns body hash did not verify. If the body matches but the signature over the headers fails, it returns signature did not verify, which points at changed signed headers or a key mismatch.
Can a footer added by Google Workspace break DKIM?
Google's guide warns about footers added by outbound gateways after the message is sent. If a footer is added before the message is signed by the system that signs it, DKIM covers the footer and still passes. Test with Show original to be sure.
Will relaxed canonicalization fix it?
Only if the change is whitespace or line wrapping. Relaxed canonicalization ignores trailing whitespace and collapses spaces, but added or changed text still changes the body hash.
Should I add the l= tag so footers don't break DKIM?
No. Google's DKIM troubleshooting guide says not to use the l= length tag because messages using it are vulnerable to abuse, and points to RFC 6376 section 8.2. Move the footer before signing instead.
Related guides
- SPF and DKIM pass but DMARC fails: how alignment works and how to fix it
- DKIM selector not found in Google Workspace: how to fix it
- How to set up DKIM in Microsoft 365 for your own domain
- How to read DMARC aggregate reports (rua)
- Custom tracking domain for cold email: what it is and how to set it up
- Cold email deliverability checklist
- All guides
- Monitoring plans