Free tools / Email

DKIM Record Checker

Finds the published keys, reads the key size and says what is wrong.

What this tool does

DKIM signs each message with a private key your mail service holds, and publishes the matching public key in your DNS. A receiver that can verify the signature knows the message was not altered and really came from a service you authorized. DMARC needs SPF or DKIM to pass, and DKIM is the one that survives forwarding.

A DKIM key lives at a name only the sender knows, so there is no way to ask a domain for the list. This check looks for keys at the selectors the common mail providers use, and you can give it a selector of your own. Each key found is read: its type, its size, whether it is revoked and whether it is still in testing mode.

Reading the result

Selector
The name the key is published under. The full record is <selector>._domainkey.<domain>.
2048 bits
The current baseline for an RSA key. 1024 still verifies but is no longer recommended.
Revoked
The record is there but its p= value is empty, which withdraws the key.
Testing
t=y tells receivers to ignore a failure, so a forged signature costs the sender nothing.
CNAME
Many providers point the selector at a name they control so they can rotate the key for you. That is normal.

How a DKIM signature is made and checked

When your mail service sends a message it hashes the body and a chosen set of headers, signs the hash with a private key, and adds a DKIM-Signature header carrying the signature, the domain (d=) and the selector (s=). The receiver reads those two values, fetches the public key from DNS at selector._domainkey.domain, and verifies the signature. If it verifies, the signed parts arrived exactly as they were sent and the sender held the key.

That is why DKIM survives forwarding when SPF does not. SPF asks whether the server that delivered the message is allowed to send for the domain, and a forwarder is not. DKIM asks whether the message is intact, which stays true however many hops it takes.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  d=example.com; s=selector1;
  h=from:to:subject:date:message-id;
  bh=<body hash>; b=<signature>
Note. The s= value is your selector. Reading it from a message you sent is the only reliable way to find it, because DNS cannot be asked to list them.

The tags in a published key

TagMeansWhat it should say
vThe record version.DKIM1, and it must come first.
kThe key type.rsa on nearly every domain; ed25519 where both ends support it.
pThe public key.A long base64 value. Empty means the key is revoked.
hHash algorithms the signer will use.Leave it out, or sha256. Never sha1 alone.
tFlags.Leave it out. t=y means testing, and a receiver may ignore a failure.
sService type.Leave it out, or email.
nA note for whoever reads the record.Anything, or nothing. It has no effect.

What goes wrong

What you seeCauseFix
No key at any selector we tryThe provider uses a selector nobody can guess, or signing was never switched on.Read the s= value from a message you sent, then check that selector here.
The signature fails on some messages onlyA mailing list or a scanner is rewriting the subject or the body after signing.Sign with relaxed canonicalization, and do not let an appliance edit mail after it is signed.
The key verifies but DMARC still failsThe signing domain is the provider's, not yours, so it does not align with the From address.Set up DKIM with your own domain as d=, which is what a provider's custom DKIM option does.
A 1024-bit keyIt was created years ago, when that was the default.Rotate to 2048 bits. Keys under 1024 bits are not acceptable at all.
Two keys at the same selectorTwo TXT records were left at one name, which is ambiguous.Keep one. Delete the other, or move it to its own selector.
The record was rejected by the DNS panelThe key is longer than the 255 characters one TXT string allows.Split it into several quoted strings in one record; most panels do this for you.

Rotating a key without stopping mail

Messages already in flight were signed with the old key, and receivers may check them minutes or hours later. So a rotation overlaps rather than switches. Where the selector is a CNAME pointing at your provider, the provider does all of this for you and nothing here needs doing.

  1. Publish the new key at a new selector and leave the old one in place.
  2. Switch the sending service to sign with the new selector.
  3. Watch for a day or two that signatures verify, using DMARC reports or the header of a test message.
  4. Empty the p= value of the old record to revoke it, or delete the record.
  5. Keep a note of which service signs with which selector, so a retired service does not leave a live key behind.

Use it with

Standards and references

Questions people ask

You found no key. Does that mean DKIM is off?

No. It means no key was published at the selectors we try. Your provider may use a selector we do not know. Send yourself a message, open the original, and read the s= value in the DKIM-Signature header: that is your selector. Then enter it here.

Where do I find my selector?

In the DKIM-Signature header of a message you sent (the s= value), or on the DNS setup page of the service that sends your mail.

How often should a key be rotated?

Once or twice a year is common practice, and your provider may do it for you if the selector is a CNAME pointing at them. Rotation limits what a stolen private key is worth.

Can I have more than one key?

Yes, and most domains should. Each service that sends mail as your domain signs with its own selector, so they do not collide.

Related tools

Want a person to look at it? These checks read what is public. A review with us covers what they cannot see. See the posture review →