Common DKIM errors and how to fix them
DKIM failures show up in the Authentication-Results header of a received message and in mail server logs. These are the usual ones, what they mean and what to change.
No DKIM record found for selector
Why. The signature names a selector that has no record in the DNS. Receivers write it as dkim=neutral (no key for signature) or dkim=permerror (no key for signature). The provider’s records were never added, were added to the wrong zone, or the provider moved to a new selector.
Fix. Copy the records from the provider’s console (often two CNAME records, such as selector1 and selector2 for Microsoft 365), check them here with that selector, then turn signing on.
DKIM signature failed
Why. The key was found, but the signature does not verify: dkim=fail (signature did not verify), or dkim=neutral (body hash did not verify) when the message was changed after signing, by a mailing list footer or a security gateway, for example. It also happens when the published key no longer matches the private key.
Fix. If all your mail fails, publish the key again from the provider: a record cut when it was pasted is common. If only forwarded or list mail fails, that is expected; DMARC can still pass through SPF on direct mail.
dkim=pass but dmarc=fail
Why. The message is signed, but by the provider’s domain (d=sendgrid.net, d=mailchimpapp.net) rather than yours. DKIM passes, but it is not aligned with the From address, so DMARC fails.
Fix. Set up domain authentication (sometimes called custom or branded domain) with the provider, so that it signs with d=your domain.
DKIM key too short
Why. The key has 1024 bits or fewer. Keys under 1024 bits are refused; 1024 bits is accepted but below current recommendations.
Fix. Generate a 2048-bit key with your provider, publish it under a new selector, switch signing to it, then revoke the old key by emptying its p=.
DKIM public key invalid
Why. The p= value is not valid base64 or not a whole key: quotes or spaces inside it, a line break, or a long value cut at 255 characters.
Fix. Paste the key in one piece. A TXT value over 255 characters must be split into several quoted strings, never cut; most DNS panels split it themselves.