Learn
DKIM selector: what it is, examples and how to find yours
A DKIM selector is the s= value that points receivers to your public key in DNS. See provider examples and how to find yours in a message header.
What it is
A DKIM selector is the name in the s= tag of a DKIM signature that tells the receiving server which public key to fetch from the signing domain's DNS. Tools and providers that ask for your DKIM selector want a short name such as google or selector1.
DKIM (DomainKeys Identified Mail) signs each message with a private key. To check the signature, the receiver joins the selector, the fixed label _domainkey and the domain in the d= tag. With s=google and d=example.com, it looks up google._domainkey.example.com.
What is a DKIM selector used for?
Domains publish several DKIM selectors so they can keep several keys live at once.
- One key per sender. Your mailbox provider and a newsletter service can each sign under their own selector.
- Changing keys. A new key goes under a new selector, and the old one stays in DNS while mail signed with it is in transit. See DKIM key rotation.
The name means nothing to the receiver. RFC 6376 treats all selectors as equal, and its examples include office locations and signing dates. A selector uses letters, digits and hyphens. A period splits it into DNS labels, so march2005.reykjavik sits at march2005.reykjavik._domainkey.example.com.
How to find your DKIM selector
Use a real message, because its header shows the selector that signed it.
- Send a message to a mailbox outside your organization. Microsoft 365 omits the signature when sender and recipient are in the same domain or organization.
- Open the full headers. In Gmail, next to Reply, click More, then Show original.
- Find the
DKIM-Signaturefield and reads=andd=from that same field. If the field is missing, the message arrived unsigned. - Repeat for every service that sends with your domain.
Receivers can also report the selector in Authentication-Results as header.s=. DMARC aggregate reports carry it in the selector element of each DKIM result. RFC 9990 requires that element. RFC 7489 did not, so older reports may omit it.
To test a selector you know, enter it with your domain in the DKIM checker. Leave the field empty and it scans the names common providers use. A scan can miss a custom selector, so an empty result does not prove that the domain has no DKIM.
Example
RFC 6376 uses the selector brisbane in its sample signature:
DKIM-Signature: v=1; a=rsa-sha256; s=brisbane; d=example.com; ...
To read the record those two tags point to, put your own values in this command:
nslookup -type=TXT brisbane._domainkey.example.com 1.1.1.1
DKIM selector examples by provider
| Service | Selector | What you publish |
|---|---|---|
| Google Workspace | google by default, or a prefix you enter |
One TXT record at google._domainkey, or at yourprefix._domainkey if you entered a prefix |
| Microsoft 365, custom domain | selector1 and selector2 |
Two CNAME records (DNS aliases), one per selector |
| Amazon SES | Three tokens shown in the console with Easy DKIM, or the Selector name you enter with your own key (BYODKIM) | Three CNAME records, or one TXT record |
| Twilio SendGrid | s1 and s2 with Automated Security, m1 without it |
Two CNAME records, or one TXT record |
These are documented defaults and examples, so copy the real values from your own console. To publish one for the first time, see how to set up DKIM.
Microsoft's examples show both s=selector1 and s=selector1-contoso-com, so read the value in your own headers.
Common mistakes
- Taking a CNAME target for the selector. In Microsoft's example,
selector1._domainkeypoints toselector1-contoso-com._domainkey.contoso.n-v1.dkim.mail.microsoft. Receivers look up the name in your DNS. The target only says where the key is kept. - Reading the wrong signature. A message can carry several, and many hosted services add one with their own domain. Use the signature whose
d=matches your domain. - Using one selector for two senders. Google tells you to enter another prefix if your domain already has a key at
google. RFC 6376 requires one TXT record per selector. Caution: overwriting a live record can make mail from the service that used it fail DKIM. - Reusing a selector for a new key. RFC 6376 advises against it, because a failed check can then no longer be told apart from a forgery.
- Deleting an old selector too soon. Caution: a missing key is a permanent DKIM failure for any message still signed with it. RFC 6376 says to keep the old public key for a reasonable validation interval. If no other DKIM signature passes with an aligned domain, and SPF does not pass and align either, the message fails DMARC, and the receiver may apply your
p=quarantineorp=rejectpolicy. - Breaking the name in the DNS panel. Keep the underscore in
_domainkeyand do not add one before the selector. Many DNS hosts append your domain, so a full name can becomeselector1._domainkey.example.com.example.com. At those hosts, enter onlyselector1._domainkey.