How to find a DKIM selector in an email's headers
By TechCompare · Updated · How we check
Open a message from the domain, find the DKIM-Signature header, and read s= for the selector and d= for the domain. The key sits at the selector, then _domainkey, then the domain.
A DKIM public key lives at a name like selector1._domainkey.example.com, and the selector part is up to whoever set up signing. DNS has no way to list the selectors a domain uses, so you can't look a key up without one. The easy way is to read it from a message: every signed email carries it in the s= tag of its DKIM-Signature header.
How this is calculated
Every mail app can show a message's raw headers. In Gmail, open the message, pick Show original from the three dot menu, and search for DKIM-Signature. In classic Outlook for Windows, open the message, go to File, then Properties, and read the Internet headers box. Apple Mail shows them under View, then Message, then All Headers.
In the DKIM-Signature header, look for a pair like d=example.com and s=selector1. The d= tag is the signing domain and s= is the selector, so that key is at selector1._domainkey.example.com. A message can carry more than one signature, often one for your domain and one for the service that sent it, so check the d= tag of each. Gmail's Authentication-Results header repeats the selector as header.s=.
Some services use the same selector names for every customer. Google Workspace suggests google, Microsoft 365 uses selector1 and selector2, and SendGrid uses s1 and s2. Others make up a selector per domain, and the only places to find it are a message header and the service's setup page.
Once you have it, enter the selector in the DNS Lookup. It reads the key, tells you whether it's RSA or Ed25519 and how long an RSA key is, and flags a key that's been revoked.
Verdict
Read the selector from a real message instead of guessing, since a wrong guess just looks like a missing key. Check both selectors if your provider uses two, because one may be waiting for the next key rotation. If the key is RSA, make sure it's at least 1024 bits, and use 2048 where your DNS host allows it.
More DNS scenarios
Related guides
Frequently asked questions
Can I list all the DKIM selectors for a domain?
Why does a message have two DKIM signatures?
What does an empty p= tag mean?
Related tools
Subnet Calculator
Calculate network address, broadcast address, and usable IP ranges for IPv4/IPv6.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use toolJWT Decoder & Validator
Decode JWT headers and claims, check exp, nbf and iat, and verify signatures locally with your own key.
Use tool