DKIM "no key for signature" and missing selectors

Receivers could not find the public key for the DKIM signature. How selectors work and how to publish the right record.

dkim=neutral (no key for signature) header.d=example.com header.s=s1
dkim=temperror (key query timeout)
dkim=permerror (no key)

The message carries a DKIM signature, but the receiver couldn't find the public key to check it. Each signature names a selector (s=) and a domain (d=). The receiver looks up the key at:

<selector>._domainkey.<domain>
s1._domainkey.example.com

If there's no valid key there, DKIM can't pass.

Common causes

  • DKIM was switched on in the sending service, but the DNS records were never published. Microsoft 365 is the classic case: it needs two CNAMEs, selector1._domainkey and selector2._domainkey, before you enable signing in the Defender portal.
  • The record was published at the wrong name. Many DNS panels append the domain automatically, so entering s1._domainkey.example.com creates s1._domainkey.example.com.example.com. Enter only s1._domainkey.
  • The key was pasted incorrectly: a line break or space in the middle of p=, quotes inside the value, or a truncated key because of the 255-character string limit.
  • A CNAME points to a record that no longer exists, for example after a provider rotated keys or you cancelled the service.
  • Two TXT records at the same selector. Verification becomes unpredictable.

How to fix it

  1. Find the selector in the failing message: the s= value in the DKIM-Signature header.
  2. Look it up: dig TXT s1._domainkey.example.com +short. You should see one record starting with v=DKIM1 and containing p= followed by a long key.
  3. If it's missing or wrong, copy the exact record again from the sending service's DNS instructions and publish it.
  4. Wait for DNS to update, then send a new test message.

dkim=none is different: it means the message wasn't signed at all. Turn on DKIM in the sending service. Unsigned mail can't pass DMARC through DKIM, and SPF alone often isn't enough.