Skip to content

How to Find Your DKIM Selector

Short answer

The fastest way to find a DKIM selector is to read the s= tag in the DKIM-Signature header of any message the domain sent. Failing that, try your provider’s default selector, or scan common selector names against <selector>._domainkey.<domain> until one returns a key.

Check it yourself
DKIM Checker
Find and validate DKIM keys — selector discovery included

DKIM public keys are published at <selector>._domainkey.<domain> as TXT records. There is no way to list them — DNS has no directory operation, so you cannot ask "what selectors exist for example.com". You have to know the name, or guess it. Three methods, in order of reliability.

DKIM Checker
Find and validate DKIM keys — selector discovery included

Method 1 — Read the s= tag from a real message

This is definitive. Every DKIM-signed message carries a DKIM-Signature header, and the s= tag in it names the selector that signed it. Find any message the domain sent, view the original source, and look at the top of the header block.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=example.com; s=selector1;
        h=from:to:subject:date:message-id;
        bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
        b=Xk9pQ2mR7vN4tY8wL3cE5aB1dF6gH0jK2lM4nO7pQ9rS...
The s= tag is the selector; d= is the signing domain

Two tags matter together. d=example.com is the signing domain and s=selector1 is the selector. The key lives at selector1._domainkey.example.com. If d= is a vendor domain rather than yours, the message is signed by the vendor and will not align for DMARC on your domain — see DMARC policy not enabled for why that matters.

Where to find the raw source in common clients: Gmail uses the three-dot menu then "Show original"; Outlook on the web uses "View message source"; Apple Mail uses View → Message → Raw Source. Then confirm the key resolves:

dig +short TXT selector1._domainkey.example.com

# A live example — Stripe signs with the selector "google":
dig +short TXT google._domainkey.stripe.com
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4T1PE2vh5..."
Resolve the key once you know the selector

A valid answer starts with v=DKIM1 (or begins straight at k=rsa — the version tag is recommended but not mandatory) and contains a p= tag with the base64 public key. If p= is present but empty, the key has been revoked, which is a deliberate signal and not the same as a missing record. If you would rather have the header parsed for you, paste the whole message source into the email header analyzer.

Multiple DKIM-Signature headers on one message are normal and legal. A message relayed through an ESP often carries one signature from your domain and one from the vendor. Read every s=/d= pair, not just the first.

Method 2 — Try your provider’s default selector

Most providers use fixed or predictable selector names. If you know who sends your mail, try theirs first. These are the defaults at the time of writing; providers do change them and some let you set a custom selector, so treat this as a starting point rather than gospel and check your provider’s current documentation if none of them resolve.

ProviderTypical selector(s)Record type at your zone
Google Workspacegoogle (default; configurable when generating the key)TXT
Microsoft 365selector1, selector2CNAME → selector1-<domain-key>._domainkey.<tenant>.onmicrosoft.com
SendGrids1, s2CNAME → s1.domainkey.uNNNNNN.wlNNN.sendgrid.net
Mailchimp / Mandrillk1, k2, k3CNAME → dkim.mcsv.net
Zoho Mailzoho (default; user-chosen on newer setups)TXT
Proton Mailprotonmail, protonmail2, protonmail3CNAME → <selector>.domainkey.<hash>.domains.proton.ch
Amazon SESThree rotating token selectors, or a custom BYODKIM selectorCNAME → <token>.dkim.amazonses.com
Postmarkpm, or a custom selector you chooseTXT or CNAME
Mailgunmailo, smtp, k1, or a chosen selectorTXT
Fastmailfm1, fm2, fm3CNAME → fmN.<domain>.dkim.fmhosted.com

Notice how many are CNAMEs. That is deliberate: pointing at the provider lets them rotate the underlying key without you touching DNS again. It also means dig +short TXT still returns the key, because the resolver follows the CNAME for you:

# The CNAME itself
dig +short CNAME selector2._domainkey.microsoft.com
selector2-microsoft-com._domainkey.microsoft.onmicrosoft.com.

# Querying TXT follows the CNAME and returns the key
dig +short TXT selector2._domainkey.microsoft.com
selector2-microsoft-com._domainkey.microsoft.onmicrosoft.com.
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
CNAME-delegated DKIM, as used by Microsoft 365

If the CNAME resolves but the TXT lookup returns nothing, the delegation target has no key yet — for Microsoft 365 that usually means signing has never been switched on for the domain. Microsoft 365 DKIM setup covers that case specifically.

Method 3 — Scan common selectors

When you have no headers and no idea who the provider is, brute force works, because the selector namespace people actually use is small. Query a candidate list and keep whatever answers.

domain=example.com
for s in google selector1 selector2 s1 s2 k1 k2 k3 \
         default dkim mail email smtp zoho protonmail protonmail2 \
         fm1 fm2 fm3 pm mandrill mailo mte1 mte2 sig1 scph0
do
  rec=$(dig +short TXT "$s._domainkey.$domain")
  [ -n "$rec" ] && echo "FOUND selector: $s"
done
A shell loop over common selector names

This is exactly what the DKIM checker does — it runs a much longer candidate list in parallel and validates whatever it finds, which is faster than a serial shell loop and does not depend on your local resolver. Use the loop when you are on a jump box with no browser.

A scan finding nothing does not prove DKIM is absent. A custom selector like 2026q3 or a random SES token will never appear in any candidate list. Absence of evidence here is genuinely weak evidence — go back to Method 1 and get a real message.

Reading the key record

TagMeaningNotes
v=DKIM1VersionRecommended first tag; some valid records omit it
k=rsaKey typersa or ed25519; defaults to rsa if absent
p=Base64 public keyEmpty p= means the key is explicitly revoked
t=yTesting modeReceivers should not treat a failure as a failure — remove after testing
t=sStrict i= scopeSubdomains may not use this key
h=sha256Permitted hash algorithmsOptional; restricts what the signer may use

Long RSA keys exceed the 255-character limit for a single DNS character-string, so they are published as several quoted chunks that concatenate. dig shows them as adjacent quoted strings on one line; that is correct and not a corruption. What *is* a corruption is a copy-paste that leaves a space or newline inside the base64 of p=.

What if several systems send as the domain?

Then you have several selectors, and finding one does not mean you are done. A typical organization signs with its mailbox provider’s selector for staff mail, a transactional ESP’s selector for receipts and password resets, and a marketing platform’s selector for campaigns — three different selectors, all with d=example.com if they are configured correctly.

The way to enumerate them is by source, not by DNS. Send one message through each system and read the s= tag from each. If you cannot trigger every system on demand, DMARC aggregate reports do the job instead: each report names the source IP and the DKIM signing domain for every stream that sent as your domain that day. That is the only complete inventory available, which is another reason to publish rua= early — see DMARC record not found.

One selector per system also means one rotation schedule per system. When a vendor rotates and you had hard-coded a TXT key instead of using their CNAME, signing silently starts failing with no key for signature. If a stream that worked for months breaks overnight and the key no longer resolves, suspect a rotation you did not follow.

Frequently asked questions

Can I list all DKIM selectors for a domain?
No. DNS has no way to enumerate names under a label, and _domainkey is not a zone you can transfer. The only reliable discovery is reading the s= tag from messages the domain has actually sent; everything else is a guess against a candidate list.
Why do I have two selectors for one provider?
Key rotation. Publishing two lets the provider start signing with the second key while the first is still valid, so no message is ever signed with a key that is not resolvable. Microsoft 365 and SendGrid both use this pattern, which is why both selectors must be published even though only one signs at a time.
My selector resolves but has an empty p= tag. What does that mean?
The key has been revoked. An empty p= is the defined way to say "this selector existed and its signatures are no longer valid", which is different from deleting the record. Any message still signed with it will fail verification. Publish a new key under a new selector.
Does the selector name matter for security?
Not for cryptographic strength, only for operations. Selectors are public and appear in every signed message. Choosing dated names like 2026q1 makes rotation schedules obvious to read, which is a management benefit rather than a security one.
Should the DKIM record be a TXT or a CNAME?
Both are valid, and it depends on your provider. A TXT record holds the key in your zone, so you own rotation. A CNAME delegates to the provider so they can rotate keys without you doing anything. Follow whichever your provider instructs — resolvers follow the CNAME transparently when querying TXT.
I found the selector but the DKIM checker says the key is invalid. Why?
Almost always a paste error in the base64. Whitespace or a line break inside the p= value, or a missing trailing character, will produce a syntactically present but unusable key. Re-copy the value from the provider in one piece and republish, then re-resolve it with dig.

Last updated: 2026-09-01