Back to ResourcesSecurity

Unraveling the Power of DKIM Selectors

By Samuel ChenardAugust 9, 2023Updated July 18, 20267 min read
Unraveling the Power of DKIM Selectors

A DKIM selector is the small label that tells a receiving mail server which public key to use when it checks your signature. DKIM lets you publish more than one signing key at a time — one per sending service, plus old and new keys during a rotation — and the selector is what keeps them straight. Get it wrong and valid signatures fail; get it right and every stream authenticates cleanly. This guide explains what a selector is, how receivers use it, how to find yours, and how to run several at once.

Unraveling the Power of DKIM Selectors

What is a DKIM selector?

Every DKIM-signed message carries a DKIM-Signature: header, and two of its tags do the routing: d= names your domain, and s= names the selector. A receiver combines them into a single DNS query:

<selector>._domainkey.<yourdomain.com>

So a message signed with d=yourdomain.com; s=mail2026 sends the receiver to look up mail2026._domainkey.yourdomain.com. That DNS record holds the public key. The matching private key never leaves your sending infrastructure — it's what computes the signature on the way out. The selector's whole job is to point the receiver at the right public key out of however many you have published.

Because the lookup name includes the selector, you can publish many keys under one domain without collision. google._domainkey.yourdomain.com, s1._domainkey.yourdomain.com, and selector2._domainkey.yourdomain.com can all be live at once, each holding a different key for a different service — and each message names exactly which one signed it.

How a selector works during signing and verification

Four-step flow showing how a DKIM selector is used to sign an email, tag its headers, and verify it on receipt. The selector links the signing key to the public key a receiving server fetches from DNS.

On the sending side, your mail server hashes selected headers and the body, encrypts that hash with the private key, and writes the result into the DKIM-Signature: header along with d= (your domain) and s= (the selector for the key it used).

On the receiving side, the server reads s= and d= from the message header, builds the ._domainkey. query, fetches the public key, and uses it to verify the signature. If the hash matches, the message wasn't altered in transit and genuinely carries a signature from a key your domain published. If the selector points to a record that doesn't exist — or to the wrong key — verification fails even though nothing malicious happened.

Verification is a different thing from alignment, which DMARC adds on top: alignment checks that the d= domain matches your visible From: domain. A signature can verify perfectly and still fail alignment, which is a common and confusing failure mode — see why DKIM signatures fail alignment.

How to find your DKIM selector

You don't guess a selector — you read it off a real message:

  1. Send an email from the service in question to an inbox you control (Gmail or Outlook both work).
  2. Open the full message headers ("Show original" in Gmail, "View message source" in Outlook).
  3. Find the DKIM-Signature: header and read the s= value. That's your selector; the d= value is the signing domain.
Most email service providers also show the selector in their sending-domain or authentication setup screen, usually as part of the DNS records they ask you to publish. If a provider hands you a CNAME to add, the selector is the left-most label of that record's name. You can confirm the published key resolves with the DKIM checker.

Why you'd run multiple selectors

There are two everyday reasons to have more than one selector live at the same time.

Key rotation. Signing keys should be replaced periodically so that a leaked or brute-forced private key has a limited useful life. Rotation is only safe if the new key can go live before the old one is retired — and separate selectors are what make that overlap possible.

Multiple sending services. Your transactional mail, marketing platform, and helpdesk each sign with their own key. Give each its own selector and they never interfere; retiring one service's key doesn't touch the others. Managing several at once is a discipline of its own — see how to manage multiple DKIM records.

Rotating DKIM keys with selectors

Five-step flow for rotating DKIM keys, from creating a new key pair to automating the process. Rotating keys regularly limits the damage a compromised private key can do.

A clean rotation uses a fresh selector for the new key so the two never clash:

  1. Generate a new key pair (2048-bit RSA is the common baseline).
  2. Publish the new public key in DNS under a new selector, e.g. 2026a._domainkey.yourdomain.com, as a TXT record (or a CNAME if your provider hosts the key for you).
  3. Switch signing to the new private key and selector on your mail server.
  4. Keep the old selector live for a grace period — messages already in transit were signed with the old key and still need to verify.
  5. Retire the old key once no mail depends on it, and repeat on a schedule.
Managed platforms like Palisade automate this whole cycle: new selectors are published, signing is cut over, and old keys are aged out without anyone hand-editing DNS at 2 a.m. That removes the two most common rotation mistakes — retiring the old key too early, or forgetting to rotate at all.

Selector vs. DKIM record: what's the difference?

They're related but not the same. The selector is the name (s= tag) that locates a key. The DKIM record is the DNS entry at ._domainkey. that actually holds the public key. One selector maps to one record. Many email delivery services publish that record as a CNAME that points at a key they generate and rotate on your behalf, so you add the CNAME once and never touch the key material yourself. Whether it's a TXT or a CNAME, the receiver's job is identical: use the selector from the message to find the record, read the key, verify.

If you're setting DKIM up alongside SPF and DMARC for the first time, the DMARC, DKIM, and SPF overview shows how the three fit together, and the Email Security Score checks all of them in one pass.

Frequently asked questions

Can I have more than one DKIM selector on the same domain?

Yes — that's the point of selectors. You can publish as many as you have keys, each at its own ._domainkey name. Each message names the one selector that signed it, so they never conflict. Most domains run several: one per sending service, plus temporary overlap during a rotation.

What happens if two services use the same selector name?

They collide. If two providers both try to use, say, s1, only one public key can live at s1._domainkey.yourdomain.com, so mail from the other service fails verification. Give each service a distinct selector — many providers already namespace theirs (like google or a provider-specific prefix) to avoid exactly this.

How often should I rotate DKIM keys?

Every six to twelve months is a reasonable cadence for most senders, and immediately if you suspect a private key was exposed. The security benefit comes from limiting how long any single key is useful to an attacker; a new selector each cycle makes the change safe. Automated rotation removes the temptation to skip it.

Does changing my DKIM selector break existing mail?

Not if you overlap. Publish the new selector's key, switch signing, and leave the old selector in DNS until in-flight mail signed with the old key has been delivered and verified. Only then retire it. Removing the old record too soon is the usual cause of a rotation that bounces legitimate mail.

Why does DKIM pass but DMARC still fails?

DKIM verifying only proves the signature is valid — DMARC additionally requires the d= domain to align with your From: domain. A third-party platform signing with its own domain will verify but not align. The fix is to sign under a selector on your own domain; see why DKIM signatures fail alignment and the common reasons DKIM fails.

Want to know whether your DKIM keys, selectors, and alignment are actually holding up across every sending service? Check your Email Security Score for a free snapshot.

Keep going with AI

Ask AI how this applies to you

Take this guide to your assistant — each question opens pre-filled, with a link back to this page so it can read the details.

  • What is a DKIM selector?
  • How does this apply to my domain?
  • What should I do about it, step by step?

Share this article

Samuel Chenard

Written by

Samuel Chenard

CEO & Co-Founder, Palisade

Samuel Chenard is the CEO and co-founder of Palisade, the DMARC automation platform for MSPs. He writes Palisade's guides on DMARC, SPF, DKIM and email deliverability.

More from Samuel

Related articles