Email deliverability

DKIM checker and key generator

Find a domain’s DKIM keys, check their size and flags, or generate a new key pair that never leaves your browser.

By using these tools you accept the Terms and the Privacy page.

The s= value from a DKIM-Signature header. Common selectors are always tried too.

How the DKIM checker grades a key

The DKIM checker finds a domain’s DKIM public keys in DNS, reads each one the way a verifier would, and grades what it finds. Use it to confirm that your provider’s keys are live and strong, or to set up signing on your own server with a new key pair.

What it checks in each key record

  • Tags. v=, if present, must come first and say DKIM1. A tag that appears twice makes the whole record invalid, and tag names are case-sensitive, so P= isn’t p=.
  • The key. The RSA size is read from the key itself. An Ed25519 key must be the raw 32 bytes, and a key whose type doesn’t match k= is flagged.
  • Flags and limits. t=y (testing) tells verifiers to treat signed mail like unsigned mail, so remove it once signing works. An h= that allows only sha1 fails, because RFC 8301 retired it, and an s= without email or * means verifiers must ignore the key for mail.
  • One record per selector. With two TXT records at one selector, the result is undefined, so verifiers may pick either.

How the grade is worked out

Each key that isn’t revoked earns points: 100 for RSA of 2048 bits or more, 95 for Ed25519, 75 for RSA of 1024 to 2047 bits, and 0 for a broken key, including RSA under 1024 bits. Test mode costs 25, and an h= that still lists sha1 costs 10. The grade counts the strongest key at 70% and the weakest at 30%, so one old key under a forgotten selector pulls a domain down. A+ needs 95, A 85, B 70, C 55 and D 40. With no live key, or a wildcard record that answers every selector, there is no grade.

Other signs of trouble

  • A wildcard. If a made-up selector also returns a record, every selector seems to have a key. Enter the exact selector from a DKIM-Signature header instead.
  • A CNAME that leads nowhere. Mail signed with that selector fails; if nothing signs with it, the record is probably left over from a provider you stopped using. For a provider known to publish the key only while it rotates keys, the page says to keep the CNAME.
  • A TXT record that isn’t a key at the selector you entered.
  • Failed lookups, named by selector, because a key there may have been missed.

How the lookups run

Every lookup runs from your browser over DNS-over-HTTPS: Cloudflare first, with Google as the fallback, and an answer marked as truncated is never trusted. The domain itself is looked up first, so an unreachable resolver or a domain that doesn’t exist ends the check before the selector sweep. Then the 60 common selectors, any selector you entered and one made-up selector (the wildcard test) go out 16 at a time. One check stops after 20 seconds: a lookup still open by then counts as failed and is named in the results. After 3 seconds, the page shows how many lookups have answered.

Using the generator

Enter the domain and a selector, and pick a key type: RSA of 2048, 3072 or 4096 bits (public exponent 65537), or Ed25519. 1024-bit RSA isn’t offered, because RFC 8301 says signers should use at least 2048 bits. Your browser’s WebCrypto API makes the key pair, and the record is read back the way a verifier reads it before it is shown. You get the TXT record and its name, its zone-file form split into strings of up to 255 characters, and the signing key as PKCS #8 PEM, the format most signing software accepts, to copy or download. A 4096-bit key can take several seconds, and Ed25519 needs a recent browser. Once the record is live, Check the published record compares DNS with the generated key and flags a record that still needs a fix, such as a missing k=ed25519 or a leftover t=y. Then check your policy in the DMARC checker, or grade DKIM with the rest of your setup in the deliverability score.

Updated · Maintained by Liviu Tanase

Questions

What is a DKIM record?

A DKIM record is a TXT record at selector._domainkey.yourdomain that holds the public key receivers use to verify the DKIM-Signature on your mail. It is a list of tags: v=DKIM1 (optional, but first if present), k= the key type (rsa by default, or ed25519), p= the base64 public key (empty means revoked), and the optional t= flags, h= hash algorithms and s= service types. Each sender signs under its own selector, so one domain can publish several keys.

How do I find my DKIM selector?

The selector is the s= tag in the DKIM-Signature header of a message you sent: open the message source (in Gmail: More, then Show original) and read s= and d=. Providers pick their own names, such as google for Google Workspace, selector1 and selector2 for Microsoft 365, k1 for Mailchimp and s1 for SendGrid. The checker tries 60 of these common names; enter any other selector in the Selector field.

Why can’t the checker find my DKIM key?

DKIM keys live at selector._domainkey.yourdomain, and DNS has no way to list the selectors a domain uses. The checker tries a list of selectors used by common providers; a key under any other name can’t be found by guessing. Send yourself a message, open its source, and look for s= in the DKIM-Signature header: that is the selector to enter.

What key size should I use?

RSA 2048 bits. RFC 8301 requires at least 1024 and recommends 2048; verifiers must reject keys under 1024. Any RSA key of 2048 bits or more makes a record longer than 255 characters, so it is stored as several TXT strings (two for 2048, three for 3072 and 4096); most DNS dashboards split it for you, but some handle long records badly. Ed25519 (RFC 8463) is short and strong, but not every receiver verifies it yet, so pair it with an RSA key under a second selector. The generator makes RSA keys of 2048, 3072 or 4096 bits, or Ed25519; it doesn’t offer 1024-bit keys.

How do I check that my mail is actually DKIM-signed?

This page checks the public key in DNS; it can’t see whether your messages carry a valid signature. To test signing end to end, send a message to the email test: it verifies up to five DKIM signatures on the message (with their key sizes) and replies with the result, together with SPF and DMARC alignment. It replies only when the message passes DKIM for its From domain, so publish the key and turn on signing first. Then make sure your DMARC policy is in place.

What does an empty p= mean?

The key has been revoked: verifiers fail any signature that uses that selector (RFC 6376 §3.6.1). It is the correct way to retire an old selector, as long as nothing still signs with it.

Why are some keys shown as CNAMEs?

Many providers ask you to point selector._domainkey at a name they control, so they can rotate keys without you touching DNS. The checker follows the CNAME and shows the key it ends at. A CNAME whose target doesn’t exist leaves the selector with no key.

How should I rotate DKIM keys?

Publish the new key under a new selector (a date-based name such as s202610 keeps it obvious), switch your signer to it, and leave the old record in DNS for a week or so while mail signed with it is still being delivered. Then replace the old key with an empty p= to revoke it.

Is the private key ever sent anywhere?

No. Keys are generated with your browser’s WebCrypto API and exist only on this page until you copy or download them. Nothing is sent to or stored by zerobounce.ai, and the key is gone when you leave or reload the page. The lookups run from your browser to Cloudflare and Google DNS-over-HTTPS.