Skip to main content
BytesProbe
Probe. Diagnose. Secure.

How to find your DKIM selector

Where the selector comes from, how to read it out of a message you have already sent, and the conventions used by Microsoft 365, Google Workspace and the common sending platforms.

DKIM is the one email authentication record you cannot find from the domain name alone. SPF lives at the domain. DMARC lives at _dmarc.example.com. A DKIM public key lives at <selector>._domainkey.example.com, where the selector is a label the sending platform chose — and there is no way to ask DNS for a list of them.

That is a deliberate part of the design. A domain can publish many keys at once, which is what makes key rotation and multiple sending platforms possible: each signs with its own selector, and receivers look up whichever one the message points at.

The reliable method: read it from a message

Every signed message carries the selector in its own headers. This works regardless of platform and tells you what is actually in use rather than what should be.

  1. Find a message your domain sent — mail yourself from the system in question.
  2. View the original or raw source. In Gmail: the three-dot menu, then Show original. In Outlook: File, then Properties, and read the internet headers.
  3. Look for the DKIM-Signature header.

It looks roughly like this:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=example.com; s=selector1;
    h=from:subject:date:to:mime-version;
    bh=2jmj7l5rSw0yVb/vlWAYkK/YBwk=;
    b=dzjVxIcK9n...

Two tags matter here. s= is the selector — selector1 above. d= is the signing domain, and for DMARC it must align with the domain in your From: header.

If a message has several DKIM-Signature headers, it was signed more than once, usually by your platform and then by a relay. The one whose d= matches your domain is yours.

If there is no DKIM-Signature header at all

Then the mail is not being signed, and no selector exists to find. That is a configuration task in the sending platform rather than a lookup problem, and it is worth fixing: DKIM survives forwarding where SPF does not.

Conventions by platform

If you cannot get hold of a sent message, these are the labels the major platforms use. Treat them as a starting point to confirm, not as fact about your domain.

PlatformSelectorNotes
Microsoft 365selector1, selector2Two are published and rotated between. Both are CNAMEs pointing into onmicrosoft.com.
Google WorkspacegoogleThe default when you generate a key in the Admin console. Can be changed at generation time.
Zoho Mailzoho, or your ownChosen when the key is created.
Mailchimp / Mandrillk1, k2, mandrillPublished as CNAMEs.
SendGrids1, s2Part of their authenticated domain setup, as CNAMEs.
Amazon SESThree generated tokensLong random labels, published as three CNAME records. Easy Mail Manager keys look different again.
Postmarkpm, or a custom labelShown in the sending domain settings.
Proton Mailprotonmail, protonmail2, protonmail3Three CNAMEs for rotation.
Generic / self-hosteddefault, mail, dkimWhatever your MTA was configured with.

The DKIM record checker probes these common labels automatically when you leave the selector blank, so you can often find the key without knowing it in advance. If nothing is found, that is not proof the domain has no DKIM — only that it does not use one of the conventional names. Read the header.

What a published key looks like

Having found the selector, the record itself is a TXT record at <selector>._domainkey.<domain>:

selector1._domainkey.example.com  TXT  "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ..."
  • v=DKIM1 — the version, and what distinguishes a real key from an unrelated TXT record.
  • k=rsa — the key type. ed25519 also exists but is not yet widely verified, so it is published alongside RSA rather than instead of it.
  • p= — the public key itself, base64 encoded.

An empty p= is meaningful: it marks the key as revoked. If you see that for a selector your mail is still signing with, signatures will fail.

Key length

1024-bit RSA keys are still common and are the weakest thing most domains publish. 2048-bit is the sensible minimum today. Some DNS providers struggle with the longer TXT record a 2048-bit key needs, which is why short keys persist; the usual workaround is splitting the value into multiple strings, which resolvers concatenate.

Common problems

Multiple TXT records at one selector. A verifier cannot tell which key to use, and the result is unpredictable. Publish exactly one record per selector.

CNAME versus TXT confusion. Several platforms have you publish a CNAME at the selector name pointing to a record they host, so they can rotate keys without involving you. If your provider asked for a CNAME, publish a CNAME — pasting the key as a TXT record at the same name will not work, and the two cannot coexist.

The record exists but mail still fails DKIM. Check that the d= in the signature matches the domain whose DNS you edited, and that the message is not being modified in transit. A mailing list that appends a footer breaks the signature it is checking.

Checking your work

Look up the selector with the DKIM record checker to confirm the key is published, parses, and is of a sensible length. Then run the whole domain through the email security checker to see DKIM in context with SPF and DMARC, since a valid key only helps if the signature also aligns with your From: domain. If you have just published the record, allow for DNS caching before concluding anything — see what TTL really means.

More in the guides index.