[ DKIM ]

DKIM selectors shared across services: avoid naming collisions

Avoid overwriting an active DKIM key when multiple services request the same selector name.

By the EmailAuth research team · 3 min read

[ Key points ]

  • Compare the complete s._domainkey.d owner name, not the selector word alone.
  • Use distinct supported selectors instead of multiple independent keys at one owner.
  • Test each service and DMARC alignment after any signing-domain change.
On this page

A DKIM selector is scoped to a signing domain. Two services can safely use the word “default” under different d= domains, but default._domainkey.example.com is one DNS owner name. If two independent services need different keys at that same name, adding the second service can break verification for the first. Resolve the ownership collision before changing DNS.

Compare the complete names

Collect a recently received signed message from each active service and record d= and s=. Compare those values with the pending provider setup instructions. For DNS-based key retrieval, the selector and signing domain determine the lookup name. A provider label such as “selector 1” in a setup screen is not enough to identify the real DNS owner. RFC 6376 §3.5 and RFC 6376 §3.6.2.1.

Illustrative example: payroll and marketing both request s=default with d=example.com, but each holds a different private key. Both signatures lead verifiers to default._domainkey.example.com. Replacing payroll's public key with marketing's key can leave payroll messages unverifiable, including messages already in transit. Conversely, default under d=payroll.example.com and default under d=marketing.example.com are different lookup names. Alignment implications still need a separate check.

Choose a supported separation design

Prefer distinct selectors for independent signing services when the providers support them. Publish the new service's generated public-key record at its own owner name, validate it, then enable that signer and test received mail. If a service fixes its selector name, ask whether it supports a separate signing subdomain or another documented configuration. Do not invent a CNAME target or rename a selector solely in DNS: the signer must emit the matching s= value.

Changing d= to a subdomain can affect DMARC. A subdomain may align under relaxed rules while failing strict alignment with a parent Author Domain. Confirm the intended relationship before choosing the naming workaround. RFC 9989 §4.4.1 and RFC 9989 §4.10.2.

Do not rely on ambiguous key answers

Under RFC 6376 §3.6.2.2, TXT key records must be unique for a selector name; multiple-record results are undefined. Publishing multiple different keys at one owner violates that publication rule and is not a service-separation design. RFC 6376 allows a verifier to select one returned key or try several at its discretion, with unspecified ordering. A configuration that works at one receiver can therefore be unreliable elsewhere. Separate selectors provide an explicit mapping instead of relying on key-selection behaviour. RFC 6376 §6.1.2.

Multiple quoted character strings within one TXT resource record are a different issue: they can be parts of a single record. Do not mistake provider display wrapping for multiple distinct keys. Compare the actual DNS answers and the provider's generated value, using a suitable DNS tool.

Handle an existing collision safely

If a collision has already occurred, capture current DNS, configuration history, affected d/s pairs and receiver failures. Restore the previous mapping only if it is safe and still needed, then bring the new service online under a supported distinct selector. Avoid sharing private keys between unrelated services merely to make them fit one public record; that expands custody and incident impact.

Keep the old verification record for the overlap your legitimate delayed-mail path needs, subject to security considerations and the provider's rotation process. A compromised key is a different case and may require immediate revocation despite delivery impact. Test both services independently after the change, record their owners and reserve their selector names in the inventory. The acceptance test is two verifiable, intended identities, not simply two green provider setup screens.

Resolve a synthetic two-service request

Assume payroll currently signs with s=default and d=example.com, and marketing requests that same pair with a different key. The lookup owner is identical, so do not overwrite it or publish the second independent key beside it. If marketing supports s=marketing2026, publish its generated key at marketing2026._domainkey.example.com and configure that same selector in its signer. Then test payroll/default and marketing/marketing2026 independently. If only a signing-subdomain option is supported, review its alignment before changing d. These are planning steps, not a tested provider procedure.

[ Takeaway ]

Compare the complete s._domainkey.d owner name, not the selector word alone. Use distinct supported selectors instead of multiple independent keys at one owner. Test each service and DMARC alignment after any signing-domain change.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Compare complete s._domainkey.d names.

Inventory the full selector owner name, service, key owner and lifecycle. Ensure the signer and DNS agree on each d/s pair, then test both old and new routes.

Next steps

  1. Compare complete s._domainkey.d names.
  2. Choose provider-supported distinct selectors.
  3. Retain safe overlap for delayed mail.

CISO / SecOps

Keep independent private-key custody where practical.

Keep independent key custody where practical and treat selector ownership as a controlled namespace. Do not resolve a naming collision by casually spreading one private key across vendors.

Next steps

  1. Keep independent private-key custody where practical.
  2. Review signing-subdomain alignment implications.
  3. Treat compromise as a separate revocation case.

Founder / Non-technical

Identify existing services before DNS changes.

Require the existing mail flows to be identified before a new service gets DNS access. A small naming decision can otherwise disrupt payroll, receipts or customer support.

Next steps

  1. Identify existing services before DNS changes.
  2. Assign owners to selector names.
  3. Require both old and new route tests.

[ FAQs ]

Frequently asked questions

Can two services use the same selector word?

Yes, if their signing domains make the full lookup names different. Compare s._domainkey.d, not s= alone.

RFC 6376 §3.6.2.1

What causes the actual collision?

Different required key mappings at the same selector owner name for the same signing domain.

RFC 6376 §3.1 RFC 6376 §3.6.2.2

Can I rename only the DNS record?

No. The signer must use the matching selector in its DKIM-Signature. Use a provider-supported selector configuration.

RFC 6376 §3.5 RFC 6376 §3.6.2.1

Can I publish both public keys at the same name?

No as a conforming separation design. RFC 6376 requires a unique TXT record for a selector and leaves multiple-record results undefined. Its verifier handling choices do not waive that publication rule.

RFC 6376 §3.6.2.2 RFC 6376 §6.1.2

Are two quoted strings necessarily two keys?

No. A single TXT record can contain multiple character strings. Inspect resource-record boundaries and the concatenated value.

RFC 6376 §3.6.2.2

Will a signing subdomain always preserve DMARC?

No. It may align in relaxed mode but fail strict alignment with a different Author Domain. Test the intended policy relationship.

RFC 9989 §4.4 RFC 9989 §4.10.2

Should I share one private key to avoid the collision?

Prefer a supported design with distinct selectors and controlled custody. Sharing a key expands the systems that can sign with it and complicates incident response.

When may the old selector be removed?

After its legitimate signing and delayed verification needs are retired under a documented plan, unless a security incident requires earlier revocation.

RFC 6376 §3.1 RFC 6376 §8.3

[ Sources ]

Sources

  1. RFC 6376

    Sections §1 · §3.1 · §3.5 · §3.6.2.1 · §3.6.2.2 · §6.1.2 · §8.3

  2. RFC 9989

    Sections §4.4 · §4.4.1 · §4.10.2

[ Glossary ]

Glossary

DKIM
A domain-associated signature over selected message content verified with public-key data.

RFC 6376 §1

Selector
The s value combined with d to determine the verification-key lookup name.

RFC 6376 §3.6.2.1

DMARC alignment
The required relationship between an authenticated identity and the Author Domain.

RFC 9989 §4.4

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base