How to find your DKIM selector
A DKIM key can only be checked if you know its selector. The quickest way to find it is in the headers of a message you've sent.
What a selector is
DKIM (DomainKeys Identified Mail, RFC 6376) adds a cryptographic signature to each outgoing message. Receivers verify it with a public key that the sending domain publishes in DNS. Every signature names two things:
d=, the signing domain, such asexample.com.s=, the selector, such asselector1.
The receiver combines them to find the key. For s=selector1 and d=example.com, it looks up the TXT record at:
selector1._domainkey.example.com
Selectors exist so a domain can have several keys at once: one per sending service, or an old and a new key during a rotation.
Why checkers ask for it
DNS has no way to list all the names under _domainkey.example.com. A checker can only ask for a specific selector. Tools like the domain checker try common names (google, selector1, selector2, default and a few others), but plenty of services use names nobody would guess. When no common selector has a key, the honest answer is "unknown", not "DKIM is missing". Entering your real selector turns that into a definite result.
Method 1: read it from a message you sent
This works for any provider and shows the selector actually in use today.
- Send a message from the domain to a mailbox you can read, such as a personal Gmail account.
- Open the received message and view its full headers. In Gmail, choose More (the three dots), then Show original. The header analyzer has steps for Outlook too.
- Find the line that starts with
DKIM-Signature:. - Read the
s=tag for the selector and thed=tag for the domain.
A signature looks like this (the long bh= and b= values are shortened):
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
s=selector1; h=From:Date:Subject:Message-ID:To;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=Hk8xT2...Qm4w==
Here the selector is selector1 and the key lives at selector1._domainkey.example.com.
A message can carry more than one DKIM-Signature. Use the one whose d= is your own domain. A signature from the provider's domain (for example, a Microsoft 365 tenant that hasn't turned on DKIM for its custom domain signs with its onmicrosoft.com domain) doesn't align with your From address, so it doesn't help DMARC.
Quicker still: paste the headers into the header analyzer. It shows the d= and s= of each signature and whether DKIM passed, without the headers leaving your browser.
Repeat this for each service that sends as your domain. Your newsletter platform and your helpdesk will each have their own selector.
Method 2: look in your provider's admin console
If you can't send a test message, the selector is shown wherever DKIM is set up. Menu names change from time to time, so search the provider's help for "DKIM" if these paths have moved.
- Google Workspace: in the Admin console, go to Apps, Google Workspace, Gmail, then Authenticate email. The default selector (Google calls it the prefix) is
google, but an admin can choose another when generating the key. - Microsoft 365: in the Microsoft Defender portal, go to Email & collaboration, Policies & rules, Threat policies, then Email authentication settings and the DKIM tab. Custom domains use two selectors,
selector1andselector2, published as CNAME records that point to Microsoft, so Microsoft can rotate the keys. - Other services: look for "domain authentication", "sender authentication" or "DKIM" in the service's settings. The DNS records it asks you to create contain the selector: it's the part before
._domainkey. Some services use short names likes1ork1; others, such as Amazon SES, use long random strings.
Your DNS provider's console is a last resort: scan the zone for records whose names contain _domainkey. That shows which keys are published, but not which ones are still in use.
Method 3: check a selector directly
Once you have a candidate, look it up. In the domain checker, enter the domain and the selector. From a command line:
nslookup -type=TXT selector1._domainkey.example.com
dig TXT selector1._domainkey.example.com
A published key looks like this (the key itself is shortened):
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtN3...IDAQAB
If the answer is a CNAME, that's normal: the service hosts the key and the CNAME points to it. Resolvers follow it automatically.
What the result means
- A key is found: DKIM is published for that selector. Check the key size. RFC 8301 recommends at least 2048 bits and tells receivers to treat signatures from keys under 1024 bits as invalid. 1024-bit keys still verify, but are worth upgrading when your provider allows it.
- The record has an empty
p=: the key at that selector has been revoked, usually after a rotation. That's fine if nothing signs with it any more. If your messages still use that selector, DKIM fails for them, so switch the service to its current key. - No record: either the selector is wrong, or DKIM isn't set up for that service. Check the
s=tag again, and look for typos in the host name you created. A common mistake is a DNS console that adds the domain automatically, givingselector1._domainkey.example.com.example.com.
If DKIM fails even though the key exists
- The message was changed in transit. Mailing lists that add footers or rewrite subjects, and some security gateways, change the signed parts of a message and break the signature.
- The key in DNS doesn't match the signing key. This happens after a rotation where DNS was updated but the service wasn't, or the other way round. Regenerate or republish the key from the service's settings.
- The record is malformed. Long keys are split into several strings in one TXT record. A DNS console that adds quotes or spaces inside the key value breaks it.
Check your DKIM key now
Enter your domain and selector in the domain checker to see the key, its estimated size and whether it's been revoked.