Log in Sign up
DKIM checker

DKIM test and lookup: find the selector, key type and length

DKIM signs each message with a private key, and receivers check the signature against the public key your domain publishes in DNS at selector._domainkey.domain. This DKIM checker looks up that TXT record. Leave the selector blank and it tries 28 common selectors at once.

Your browser sends the query straight to Cloudflare DNS, with Google DNS as a fallback. Our server does not see it.

A message with a DKIM signature and the key that verifies it

How DKIM keys work

Your mail server signs each outgoing message and adds a DKIM-Signature header that names the domain in d= and the selector in s=. The receiving server joins them into selector._domainkey.domain, fetches the public key from DNS and checks the signature. A missing key makes DKIM fail, and so does a message edited in transit.

The selector lets one domain hold several keys: one per mail service, or an old and a new key during rotation. This page runs the same TXT query a receiver runs. Your browser sends it to Cloudflare DNS, with Google DNS as a fallback, and you need no test email. For MX, SPF, DMARC and DKIM in one report, run the email domain check.

When you need it

  • Check that a new mail service signs with your domain
  • Find the selector of a domain when nobody wrote it down
  • Find 1024-bit keys before a campaign
  • Confirm that a key rotation reached DNS and the old key shows an empty p=

DKIM record example: the tags v, k, p, t, h, s and n

A DKIM TXT record is a list of tag=value pairs split by semicolons, such as v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA... The p= value is the public key in base64. A 2048-bit RSA key takes 392 characters, more than the 255 a single DNS string can hold, so DNS hosts split it into several quoted strings; the checker joins them before it reads the tags. v=DKIM1 is the version and must come first when present. k= names the key type, rsa (the default when k= is missing) or ed25519. p= holds the key, and an empty p= means the owner revoked it. t= carries flags: y marks test mode, and s requires the i= domain in signatures to match d= with no subdomains. h= limits the hash algorithms to sha256 or sha1, s= limits the service type, and n= holds a note for humans.

DKIM selectors by mail provider

Google Workspace uses google unless an admin set a custom prefix, and publishes the key as a TXT record. Microsoft 365 uses selector1 and selector2, both CNAMEs to keys that Microsoft hosts; Microsoft signs with one at a time, so check both. SendGrid uses s1 and s2, Mailchimp k2 and k3 (k1 on older setups), and Fastmail fm1, fm2 and fm3, all as CNAMEs to the provider. HubSpot uses hs1 and hs2, followed by your account ID on customer domains, as in hs1-1234567. Zoho Mail lets you name the selector when you create the key. A blank selector field covers google, selector1, selector2, s1, s2, k1, k2, fm1, fm2, zoho and hs1. For k3, fm3, a custom Google prefix or a HubSpot selector with an ID, type the selector into the second field.

Reading the DKIM check result

For each selector that answers, the checker prints the record name, the selector, the key type, the key length, the t= flags and the raw record. The length is an estimate: the tool decodes the base64 key, subtracts the standard key header and rounds to the nearest 512 bits, which gives 1024, 2048 or 4096 for common RSA keys. Ed25519 keys show 256 bits. An RSA key under 2048 bits gets a weak-key warning. An empty p= gets a revoked-key error, since mail signed with that selector fails DKIM. A t=y flag adds a test-mode warning. A 2048-bit or Ed25519 key without t=y shows "The key looks fine." In blank-selector mode the checker counts the keys it found and lists live keys before revoked ones.

Questions and answers

01How do I find my DKIM selector, and can I check without one?

Open a message you sent, show the original headers and find DKIM-Signature: the selector is the s= tag and the domain is d=. Your mail provider's admin panel lists it too. If you have neither, leave the selector field blank. The checker then queries 28 common selectors at once and lists every key it finds.

02Why does the checker say no DKIM record found?

The selector you typed may not match the one your server signs with. Take the s= tag from a real message; the field accepts the bare selector or the full selector._domainkey.domain name. If your provider asked for a CNAME, confirm you created it at selector._domainkey and that the provider has turned on the key behind it. After a DNS change, resolvers can serve the cached answer until its TTL runs out, so wait that long and check again.

03Is a 1024-bit DKIM key still OK, or should I use 2048?

Receivers verify 1024-bit signatures today, so a 1024-bit key will not make DKIM fail. RFC 8301 sets 1024 bits as the minimum and tells signers to use 2048, and Google's sender guidelines ask for 2048 where the DNS host supports it. Older Microsoft 365 setups and Mailchimp's k1 selector publish 1024-bit keys. Move to 2048 at the next rotation. Ed25519 keys are short and strong, but fewer receivers verify them, so publish one next to an RSA key.

04Can a domain hold several DKIM keys?

Yes. Each service gets its own selector: one for Google Workspace, another for the mailing service. The keys live on different names and do not interfere.

05How often should I rotate the DKIM key?

Every 6 to 12 months. Publish a new key under a new selector, switch signing to it, and remove the old record or empty its p= a few days later, once mail signed with the old key has reached its recipients.

06What do t=y and an empty p= mean in a DKIM record?

t=y tells receivers you are testing DKIM on the domain. RFC 6376 tells them to handle your mail like unsigned mail when a signature fails, so a broken setup costs you little while you debug. Remove t=y once signing works. An empty p= revokes the key, and mail signed with that selector fails DKIM. After a rotation you want that. If your server still signs with the selector, all its mail fails DKIM.

07Why does my provider ask for a CNAME instead of a TXT record for DKIM?

A CNAME at selector._domainkey hands the key to the provider. Microsoft 365, SendGrid, Mailchimp and Fastmail publish the TXT record on their own domain and rotate it there, and you never paste a new key into your DNS. The checker follows the CNAME to the TXT record at its end and shows that key. It does not display the CNAME target, so use the CNAME lookup to see where the record points.

08How do I check a DKIM record with dig or nslookup?

Query the TXT record at the selector name: dig +short TXT google._domainkey.example.com on Linux or macOS, or nslookup -type=TXT google._domainkey.example.com on Windows. Put your selector in place of google and your domain in place of example.com. Both commands ask your local resolver while this page asks Cloudflare DNS, so for a while after a change the answers can differ.

09Why does DKIM fail when the DKIM record looks fine?

The checker tests the key in DNS. A message can still fail DKIM when a forwarder, mailing list or security gateway edits the body or signed headers after signing, when the server signs with a selector that has no key, or when you revoked the old key before mail signed with it arrived. To see the verdict for one message, paste its headers into the email header analyzer. It reads the DKIM result from Authentication-Results and links back here with the domain and selector filled in.

Pricing Grab a free hour