DKIM 'No Key for Signature' / dkim=permerror: How to Fix It

What DKIM no key for signature and dkim=permerror mean, how to find the key record from s= and d=, the missing CNAMEs, split TXT strings, revoked keys and DNS errors behind it, and how to fix and verify it with dig.

Home › Guides › DKIM no key for signature

Last updated 18 October 2026

Quick answer

A DKIM no key error means the receiving server tried to fetch the signer's public key from DNS and couldn't use what it got back. The key always lives at <selector>._domainkey.<domain>, built from the s= (selector) and d= (signing domain) tags of the DKIM-Signature header. Either no record exists at that name, the record can't be parsed, the key was revoked with an empty p=, or DNS didn't answer.

The fix, in order:

  1. Read s= and d= from the failing message.
  2. Query exactly s._domainkey.d with dig, nslookup or Resolve-DnsName.
  3. Publish or repair that one record: the two Microsoft 365 selector CNAMEs, the Google Workspace google._domainkey TXT record, or your sending service's record, copied exactly.
  4. Wait for DNS to update, then send a new test message and check its headers.

What the error means

RFC 6376 section 6.1.2 lists what a verifier does when it gets the public key. The parts that produce no key style errors are:

What happened in DNSRFC 6376 status (explanation)
The query got no responseThe verifier MAY return TEMPFAIL (key unavailable) and try again later.
No key record exists at the nameThe verifier MUST return PERMFAIL (no key for signature).
A record exists but isn't valid key syntaxPERMFAIL (key syntax error). Malformed key records MUST be ignored.
The key record's h= doesn't include the signature's hash algorithmPERMFAIL (inappropriate hash algorithm).
The p= tag is emptyPERMFAIL (key revoked), treated as a failed signature check.
The key doesn't suit the signature's a= and k=PERMFAIL (inappropriate key algorithm).

PERMFAIL is a permanent error and the signature shouldn't be reconsidered; TEMPFAIL means it couldn't be verified this time but may be tried again (RFC 6376 sections 3.9 and 6.1). The words in brackets are not fixed strings: the RFC says the explanation is not normative and is there only for clarification.

How receivers report it

Receivers write the result into the Authentication-Results header using one of the DKIM result values in RFC 8601 section 2.7.1:

ResultMeaning (RFC 8601)Relevance to a key problem
noneThe message was not signed.Not a key problem: no DKIM-Signature header was found.
passSigned, and the signature passed verification.The key was found and worked.
failSigned, but the signature failed verification.Some receivers use this for a missing or revoked key, with a comment saying so.
policySigned, but some aspect of the signature wasn't acceptable to the receiver.The receiver's own rules (for example about algorithms or key length).
neutralSigned, but the signature had syntax errors or couldn't be processed; also used for other failures not covered elsewhere.Some receivers use it for records they can't parse.
temperrorA transient error, such as a temporary inability to retrieve a public key. A later attempt may produce a final result.DNS timed out or returned an error for the key name.
permerrorAn unrecoverable error; a later attempt is unlikely to produce a final result.The usual result for no key, a revoked key or a key syntax error.

The wording varies by receiver. One may show dkim=permerror, another dkim=fail or dkim=neutral with its own comment in brackets about the key, so don't search headers for one exact phrase. An illustrative example:

Authentication-Results: mx.receiver.example;
  dkim=permerror (no key for signature) header.d=example.com header.s=s2024;
  spf=pass smtp.mailfrom=example.com;
  dmarc=pass header.from=example.com

Here DMARC still passes only because SPF passed and aligned. A signature that can't be verified doesn't help DMARC, so once the message is forwarded and SPF fails, DMARC fails too.

Find the selector and domain (s= and d=)

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
  s=s2024; h=from:to:subject:date:message-id;
  bh=<base64 body hash>; b=<base64 signature>

The Email Header Analyzer lists every DKIM signature with its d= and s=, next to the receiver's results.

Common causes

Step 1: Read s= and d= from the failing message

Open the received copy (view the original or the message source) and paste the headers into the Email Header Analyzer. Note the DKIM result and comment from the receiver's own Authentication-Results line, and the d= and s= of the signature that failed. Build the record name <s>._domainkey.<d>.

Step 2: Query that exact name

# Linux or macOS
dig +short TXT s2024._domainkey.example.com
dig TXT s2024._domainkey.example.com +noall +comments +answer
dig +short CNAME selector1._domainkey.contoso.com
dig @1.1.1.1 +short TXT google._domainkey.example.com
dig @8.8.8.8 +short TXT google._domainkey.example.com

# Windows (Command Prompt or PowerShell)
nslookup -type=TXT google._domainkey.example.com
Resolve-DnsName -Name selector1._domainkey.contoso.com -Type CNAME
Resolve-DnsName -Name selector1._domainkey.contoso.com -Type TXT

The second dig command prints the response status (NOERROR, NXDOMAIN or SERVFAIL). For a Microsoft 365 selector, the CNAME query shows where the name points and the TXT query follows the CNAME to the key. How to read the result:

What you getWhat it means
NXDOMAIN, or NOERROR with no answerNo record at that name: the no key for signature case. Publish it, or fix the name.
A CNAME, but no TXT record at its targetThe CNAME points nowhere useful (a typo, or the provider no longer has that key). Copy the target again from the provider.
v=DKIM1; k=rsa; p= with nothing after p=The key is revoked. Sign with a selector that has a live key.
Several quoted strings in one answerNormal for a long key. Check that the joined text is the full key, in order, with no stray quotes inside.
Two or more TXT recordsResults are undefined. Delete all but the correct one.
SERVFAIL or a timeoutA DNS problem, not a missing record; this is what causes temperror. Check the domain's name servers.
Different answers from different resolversA recent change that hasn't reached every resolver yet. Wait and check again.

Step 3: Publish or repair the record

Step 4: Wait for DNS, then re-test

  1. Check the record from many public resolvers with the DNS Propagation Checker (record type TXT, or CNAME for Microsoft 365 selectors). Resolvers may keep an earlier answer, including a name does not exist answer, cached for a while.
  2. Run the domain through the DKIM Checker and add the selector from s= as an extra selector (or enter the full selector host name). It shows whether a key is published, its length, and whether it was revoked.
  3. Send a new message to an outside mailbox. A message that already arrived keeps the result it was given, so re-checking its old headers won't show the fix.

Avoid it next time

Verify the fix

  1. Confirm the key with the DKIM Checker and decode it with the DKIM Record Explainer.
  2. Confirm the record is visible everywhere with the DNS Propagation Checker.
  3. Paste a new test message's headers into the Email Header Analyzer and look for dkim=pass with header.d set to your domain, and dmarc=pass. If DKIM now fails with body hash did not verify, the key is fine and something changed the message in transit: see how to fix DKIM body hash did not verify.
  4. Check your DMARC policy with the DMARC Record Checker. If DKIM passes but DMARC still fails, the signing domain isn't aligned: see DMARC fail with SPF pass.

Audit hundreds of domains at once

Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).

Related tools and guides

Find published selectors with the DKIM Checker, decode a key record with the DKIM Record Explainer, read s=, d= and DKIM results with the Email Header Analyzer, check a new record across resolvers with the DNS Propagation Checker or query it with DNS Lookup. Related guides: DKIM for Microsoft 365, SPF, DKIM and DMARC for Google Workspace, DKIM body hash did not verify and DMARC fail with SPF pass (alignment).

FAQ

What does DKIM no key for signature mean?

The receiver looked up the public key at the selector._domainkey name built from the s= and d= tags of the DKIM-Signature header and found no key record there. RFC 6376 calls this PERMFAIL (no key for signature). Receivers report it as dkim=permerror, or as fail or neutral with a comment.

Is dkim=permerror the same as dkim=fail?

Not quite. In RFC 8601, fail means the signature was checked and failed verification, while permerror means it could not be verified at all because of an unrecoverable error, such as a missing or broken key record. Either way the signature does not count toward DMARC.

How long does a new DKIM record take to work?

It depends on the provider and DNS caching. Google says DKIM authentication can take up to 48 hours to start working after you add the key, and Microsoft says detecting new DKIM CNAME records takes a few minutes or possibly longer. Resolvers may also keep an earlier answer cached for a while.

What does an empty p= in a DKIM record mean?

The key has been revoked. RFC 6376 says verifiers must treat a signature that uses it as failed and return PERMFAIL (key revoked), and there is no defined difference between a revoked key and a removed one. Sign with a different selector that has a live key.

Why do I see dkim=temperror instead of permerror?

temperror means the receiver could not fetch the key because of a temporary problem, such as a DNS timeout or server error, and a later attempt may work. permerror means the lookup gave a final answer that cannot be used. Repeated temperror results point to a problem with the domain name servers.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.