
A DKIM public key is published in DNS, but you cannot look it up until you know the selector. Providers invent those names. Guessing google, s1, or default wastes time and can show you a key for a route you are not using.
This guide shows how to read the selector from a real message, build the DNS name, and inspect the public key. Use it with the DKIM overview and the DKIM record checker when you want a browser lookup.
Direct answer
- Send a test message through the same route as production mail (same From domain, same ESP or mail server).
- Open the received copy, not the sent folder.
- Find the
DKIM-Signatureheader. Copys=(selector) andd=(signing domain). - Look up
s._domainkey.das a TXT record. - Read
v=DKIM1andp=(the public key). Emptyp=means the selector is revoked.
If there is no DKIM-Signature header, the route is not signing. Publishing a key will not help until signing is turned on.
Why the selector exists
One domain can sign with several keys at once. Typical reasons:
- Two products send mail (transactional platform and newsletter tool).
- You are rotating a key and both the old and new selector must work for a week.
- A vendor publishes its own selector under your domain via CNAME.
The selector is not a secret and not your mailbox name. It is a label so receivers know which public key to use. The lookup is always:
<selector>._domainkey.<signing-domain>
Example: s=campaign2026 and d=example.com become campaign2026._domainkey.example.com. That is a documentation example. Your values come from the header.
How to open the DKIM-Signature header
Gmail (web): Open the message, open the three-dot menu, choose Show original. Search the page for DKIM-Signature.
Gmail (original message): You will also see an authentication block near the top. Useful, but still copy s= from the signature itself. The summary can say PASS while you still need the selector for DNS.
Outlook / Microsoft 365: Open the message, view properties or internet headers (wording varies by Outlook edition). Search for DKIM-Signature.
Apple Mail: View → Message → All Headers, or use a raw source view if you have it enabled.
A catch-all mailbox you control: Best for tests. Forwarding can add extra signatures or break the original one. Prefer reading mail that arrived directly at the test inbox.
Copy the whole header once. It is one logical line that mail clients may wrap.
Tags you actually need
A signature contains many tags. For finding the key, four matter:
| Tag | Meaning |
|---|---|
d= |
Signing domain. This is the domain in the DNS name. |
s= |
Selector. This is the left-hand label before ._domainkey. |
a= |
Algorithm, often rsa-sha256. Tells you what kind of key to expect. |
bh= / b= |
Body hash and signature. You do not paste these into DNS. |
Optional but useful: t= (timestamp) and x= (expiry) explain whether a signature is stale. i= is an identity under the signing domain. Ignore marketing folklore that i= must match the From mailbox. Alignment for DMARC cares about the organizational domain of d= versus the visible From domain.
If you see two DKIM-Signature headers, record both. Forwarders, mailing lists, and some gateways add a second signature. The one whose d= matches the domain you operate is the one to check first.
Look up the public key
Use any of these:
- The DKIM record checker in this site (browser DNS over HTTPS).
dig TXT selector._domainkey.example.comon a workstation.- Your DNS host’s record list (look for TXT or a CNAME to the vendor).
What you should see:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEF...
v=DKIM1identifies a DKIM key record.k=rsais the default key type.ed25519exists but is less common.p=is the Base64 public key. Receivers use it to verifyb=.
Empty p= is valid syntax that means “this selector is revoked.” New signatures using it should fail. That is how you retire a leaked or rotated key.
CNAME instead of TXT: Many ESPs ask you to create selector._domainkey.example.com as a CNAME to a name they control. Public resolvers still return the TXT at the destination. If your DNS UI only shows the CNAME, that is expected.
Provider names are hints, not answers
Common selectors you will see in the wild:
- Google Workspace: often
google - Microsoft: often
selector1andselector2 - Several ESPs:
s1,s2,k1, or a date such as202601
Treat those as rumors until a received header confirms them. A domain can publish google from an old Workspace setup and sign newsletters with s1 from another vendor. Checking the wrong selector looks like “DKIM is missing” when the live route is fine.
If the vendor dashboard shows a selector, still send a test. Dashboards lag. The header does not.
Confirm the key matches the route you care about
Finding a key is not the same as proving production mail is signed.
- Compare
d=to the visible From domain. If they differ at the organizational domain, DMARC will not get an aligned DKIM pass from that signature. - Confirm the test used the same sending integration as campaigns (API key, SMTP user, or Workspace route).
- After a rotation, both selectors should exist until old queued mail drains.
- If
p=looks truncated in DNS, some hosts split long TXT strings across strings in one record. Resolvers should concatenate them. If a checker shows a broken Base64 value, inspect the raw TXT.
Cryptographic verification of b= is a separate step from “the TXT exists.” The checker on this site explains syntax. A received-message authentication result (Gmail’s original, or an Authentication-Results header) tells you whether that message verified.
Mistakes that waste a morning
Using the envelope domain instead of d=. SPF and DKIM can use different domains. The key lives under d=.
Looking in the sent folder. Many clients never store the signature the receiver saw.
Checking only production DNS while mail still goes through a subdomain. news.example.com is not example.com. Use the d= value exactly.
Treating a BIMI or SPF record as DKIM. SPF is usually on the apex or a specific sending host. BIMI lives at default._bimi. DKIM keys live under ._domainkey.
Copying p= into a private key field. The DNS value is public. The private key stays in the ESP or your signer. You should never need to paste a private key into a blog post, a ticket, or a public checker.
When you cannot find a signature at all
Work the sending path, not DNS:
- The ESP’s “authenticate domain” step was skipped or applied to a different domain.
- Mail is going through a different SMTP relay than the one you configured.
- A development environment sends unsigned.
- The client stripped headers (some mobile forwards).
Turn signing on, send another test, then come back to this guide. Publishing keys first is backwards.
Keep a short runbook
Write down, for each sending product:
- From domain
- Selector
- DNS name
- Who owns the private key (vendor versus your signer)
- Rotation date
When a campaign fails authentication, you will not be guessing s1 versus google under pressure. For how the three protocols fit together, read DKIM vs SPF vs DMARC. For junk placement after auth looks fine, read why emails go to spam.