DKIM fail: why signatures break and how to fix them

DKIM puts a digital signature on every message you send. The receiving server looks up your public key in DNS and uses it to check two things: that the message really came from a server holding your private key, and that nobody changed it on the way. A "fail" means that check didn't work out. It's either the key in DNS or the message itself.

Run the check below to see which DKIM keys your domain publishes and whether receivers can read them. Then compare the result with a failing message's headers to find which of the two is at fault.

DNS Mail Check is a service for owners of business and organization domains. The checks on this page are free for any domain.

The part after the @ in your email address. Enter a domain or address to check.

Narrow it down in three steps

Read the DKIM verdict in the failing message's headers, look up the exact key it names, then trace the servers the message passed through.

Read moreShow less: Narrow it down in three steps
  1. Read the verdict in the headers. Paste the failing message's headers into the header analyzer. The DKIM line gives the result and two values that matter: header.d, the domain that signed, and header.s, the selector, which is the name of the key used. A reason such as "body hash did not verify" means the message was changed after signing; "no key" or a permerror points at DNS.
  2. Look up that exact key. Enter the domain and the selector in the DKIM lookup. It shows whether a record exists at selector._domainkey.yourdomain, whether the key can be read, how long it is, and whether it has been revoked.
  3. Follow the message's path. If the key is fine, something edited the message. The hop list in the header analyzer shows every server it passed through after yours, such as a mailing list, a security gateway or a forwarding service. One of those is the usual culprit.

How receivers report DKIM

What each result a receiver can report means, from pass through none, and why an unsigned message is a different problem from a failed one.

Read moreShow less: How receivers report DKIM
  • pass: the signature verified with your key.
  • fail: the signature didn't verify, most often because the message changed after signing.
  • neutral: the signature had a syntax error or couldn't otherwise be processed.
  • policy: the signature verified, but the receiver's own policy didn't accept it, for example because the key is shorter than it allows.
  • permerror: something that won't fix itself, such as a missing key record or a key that can't be parsed.
  • temperror: the key lookup timed out; trying again later may succeed.
  • none: the message had no DKIM signature at all.

A result of none is a separate problem from a failure: nothing signed the message. That still matters, because without a signature DMARC has to rely on SPF alone.

Why DKIM fails, most likely first

Six causes, from a message changed after it was signed to a key still flagged for testing.

Read moreShow less: Why DKIM fails, most likely first

1. Something changed the message after it was signed

Mailing lists that add a footer or tag the subject line, security gateways that rewrite links, and disclaimer tools that append text all alter signed content. The receiver recomputes the signature, gets a different answer, and reports a fail with "body hash did not verify" or a similar reason.

  • Confirm it: the key in DNS reads fine, and the hops show a list server or gateway between your server and the recipient.
  • Fix it: if it's your own gateway or disclaimer tool, make it act before the message is signed, not after. If it's someone else's mailing list, you can't change it; their list should handle DMARC-protected senders, for example by rewriting the From address.

2. The key record is broken

DKIM keys are long, and copying them into a DNS control panel often goes wrong. The key gets cut off, quotes or line breaks end up inside the value, or a 2048-bit key is pasted into a field limited to 255 characters without being split.

  • Confirm it: the DKIM lookup says the key "can't be read" or shows a length shorter than the one your provider generated.
  • Fix it: delete the record and paste it again from your provider's settings. A single TXT string can hold at most 255 characters, so a 2048-bit key has to be stored as two or more quoted strings. Some DNS hosts split it for you; others need you to enter the pieces yourself.

3. The selector isn't where the receiver looks

The record must sit at exactly selector._domainkey.yourdomain.com. Some DNS panels add your domain to whatever you type, so entering the full name produces google._domainkey.yourdomain.com.yourdomain.com.

  • Confirm it: the DKIM lookup with the right selector finds nothing, while a DNS lookup of the doubled name does.
  • Fix it: enter only the part before your domain, such as google._domainkey, in the name field.

4. The key was rotated or revoked while still in use

Providers replace keys from time to time, and admins sometimes delete or empty an old selector too early. A record with an empty p= value means "this key is revoked", so anything still signed with it fails.

  • Confirm it: the DKIM lookup shows "key revoked", or the selector in a failing message's headers differs from the one your provider currently lists.
  • Fix it: publish the key your provider shows now and make sure signing uses it. Keep an old selector published until mail signed with it has stopped arriving.

5. The key is too short

Under the current rules, receivers must not accept signatures made with RSA keys shorter than 1024 bits. A 512-bit or 768-bit key from an old setup fails at every receiver that follows the current standard, even when it's published perfectly.

  • Fix it: generate a new 2048-bit key with your provider, publish it under a new selector, then switch signing to it.

6. Test mode

A key record containing t=y is flagged as being tested. Receivers must not treat mail signed with it any differently from unsigned mail, so don't rely on it while the flag is set. Remove the flag once the key works.

Provider fixes

Where to find the DKIM settings in Google Workspace, Microsoft 365 and cPanel, and which records each one needs in DNS.

Read moreShow less: Provider fixes

Google Workspace

In the Admin console open Apps, Google Workspace, Gmail, Authenticate email. Generate a new record (Google recommends 2048-bit; choose 1024-bit only if your DNS host can't store the longer value), publish it as a TXT record at google._domainkey, wait until the record is visible, then click Start authentication. Until you do this, your mail isn't signed with your own domain, so DKIM can't help DMARC for it.

Microsoft 365

Microsoft uses two CNAME records, selector1._domainkey and selector2._domainkey, that point at keys Microsoft hosts, so keys can be rotated from the portal without editing DNS. In the Microsoft Defender portal open Email & collaboration, Policies & rules, Threat policies, Email authentication settings, select the DKIM tab and your domain, publish the two CNAME values it shows, then turn on signing. Copy the targets exactly; they contain your domain and tenant names and differ from one organisation to another.

cPanel hosting

If you send mail from a cPanel web host, open Email Deliverability in cPanel. It shows whether the DKIM record the server expects is published. If your DNS is hosted on the same server, the Repair button publishes it for you; if your DNS is elsewhere, copy the suggested record shown there into your DNS provider exactly as given.

Worked example: shopify.com, checked 21 October 2026

Of nine selectors found on shopify.com, pm holds a key that was cut short and announces only 768 bits, so any message signed with it can never pass DKIM.

Read moreShow less: Worked example: shopify.com, checked 21 October 2026

We ran the DKIM lookup on shopify.com. It found nine selectors, eight of them with readable keys, and summarised the result as "Found 8 DKIM keys (google, resend, m1, smtpapi, mail, kl2, zendesk1, zendesk2)." The ninth was flagged:

Selector:  pm._domainkey.shopify.com
Record:    v=DKIM1; k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhANOtTzK6Ct6R4u976UZjFs1eiurj69J8l0P0LfRJnRCB/ReBQk6aZVVi2hQ82Q9Dt0rAW61ejGe4bAFx
Result:    Selector pm (Postmark): key can't be read

Our selector list associates the name pm with Postmark; the record itself doesn't say which service it belongs to. The key data is 112 characters long, which decodes to 84 bytes, while the key's own header announces 126 bytes. The value has been cut short. The header also announces a 768-bit key, which would be below the 1024-bit minimum even if it were complete. We also read the record straight from DNS with dig: it is served as a single 112-character string, so it was cut short when it was published, not by the way our checker joins long records.

The effect: any message signed with d=shopify.com; s=pm can never pass DKIM at any receiver. We can't see from DNS whether anything still signs with that selector. If nothing does, the record is harmless clutter. The exact fix is to delete it, or to replace it with the full current key, 2048-bit, from whichever service uses the pm selector, if one does.

When to get help

Failures seen only behind one mailing list or gateway are for its administrators to fix; ask each sending service for its record if you can't match selectors, and get help if DKIM shows as active but receivers see no signature.

Read moreShow less: When to get help

If failures only happen at recipients behind one mailing list or one company's gateway, the fix is on their side; send their administrators the failing message's headers. If you can't tell which service signs with which selector, ask each sending service's support for their current DKIM record and compare it with the lookup.

Get help also if your provider's console shows DKIM as active but receivers still report no signature. That usually means mail is leaving through a different route than you think, such as a separate relay, an app server or an older system.

DKIM failure questions

Answers on whether a failure means rejection, failures at only some recipients, key length and using more than one key.

Does a DKIM failure mean my email will be rejected?

Not on its own. A failed signature is treated like no signature. What happens next is decided by DMARC: if SPF passes and its domain matches your From domain, DMARC still passes. If neither passes and your policy is quarantine or reject, receivers are asked to send the message to spam or refuse it.

Why does DKIM pass for most recipients but fail for some?

The signature was fine when it left you, so something on the way to those recipients changed the message. Mailing lists, forwarding services and some corporate gateways are the usual reasons. The header analyzer's hop list for one of the failing copies shows where it went.

What key length should I use?

2048-bit RSA is the usual recommendation, and it's what Google recommends. Receivers that follow the standard must accept 1024-bit keys. Signatures made with shorter keys must not be treated as valid.

Can a domain have more than one DKIM key?

Yes, and it's common. Each key lives under its own selector name, so Google, Microsoft and every other service you use can each have their own without interfering. The DKIM lookup tries dozens of common selector names; enter yours if it isn't found.

Related problems and tools

Guides: DKIM keys and selectors and Reading email headers.