A DKIM selector is a label in the s= tag of a message's DKIM-Signature header. Together with the signing domain in the d= tag, it tells the receiving server where to find the public key: at selector._domainkey.domain, as a DNS TXT record. One domain can publish several selectors at once, one per sending service or key, which is how key rotation works without downtime.
Key takeaways
- A DKIM selector is the s= value; with d= it builds the DNS name selector._domainkey.domain where the public key lives.
- Google uses google, Microsoft 365 uses selector1 and selector2, and SendGrid commonly uses s1 — selectors are set by the sending platform.
- Rotate keys by publishing a new selector first, switching signing to it, then removing the old record — never reuse a selector for a new key.
Every DKIM-signed email carries a small label that most people never notice. That label — the selector — is what lets a receiving server find the right public key among the several a domain may publish. Get it wrong, and your mail fails authentication even though the signature itself is fine.
What is a DKIM selector?
A DKIM selector is the value of the s= tag in a message's DKIM-Signature header. It names one public key among the several a signing domain may publish, so the receiver knows exactly which DNS record to query.
DKIM, defined in RFC 6376, lets a domain sign outgoing mail with a private key. The receiver fetches the matching public key from DNS and checks the signature. Without a selector, that lookup would be ambiguous: a domain that sends through Google Workspace, Microsoft 365 and a marketing platform needs three different keys, and the receiver needs to know which one applies to this message.
RFC 6376 section 3.1 puts it plainly: to support multiple concurrent public keys per signing domain, the key namespace is subdivided using selectors. The selector is just a label — google, selector1, s1, mandrill — but it is the label that makes the whole system work.
How does a DKIM selector work?
The receiver reads two tags from the signature — d= for the signing domain and s= for the selector — then builds one DNS name: selector._domainkey.domain. It queries that name for a TXT record holding the public key, then verifies the signature.
Here is a real example from RFC 8463, quoted in the DKIM guides: a signature with d=football.example.com and s=test means the receiver queries test._domainkey.football.example.com. If that record is missing, or the key in it does not match the signature, DKIM fails.
Selectors can contain dots. RFC 6376 gives the example march2005.reykjavik, which resolves to march2005.reykjavik._domainkey.example.com. Some teams use that pattern to encode a rotation date or a region into the selector name.
DKIM selector vs signing domain: what is the difference?
The signing domain (d=) says who takes responsibility for the message. The selector (s=) says which of that domain's keys signed it. You need both to find the key.
| Tag | What it is | Example | Where it appears |
|---|---|---|---|
| d= | Signing domain, the domain responsible for the message | example.com | DKIM-Signature header; DMARC compares it with the From domain |
| s= | Selector, the label for one key pair | DKIM-Signature header; first part of the DNS name | |
| _domainkey | Fixed subdomain where all DKIM keys live | _domainkey | Middle of the DNS lookup name |
| p= | Public key, base64 encoded, in the DNS TXT record | MIGfMA0GCSq... | DNS TXT record at selector._domainkey.domain |
| v=DKIM1 | Version tag in the DNS record | v=DKIM1 | Start of the DNS TXT record |
DMARC cares about the d= value: it checks whether the signing domain aligns with the domain in the From address. The selector itself does not affect DMARC alignment, but a wrong or missing selector breaks DKIM, which can break DMARC for domains that rely on DKIM alignment. Our guide to what DKIM is explains the full signing and verification flow.
What are the common DKIM selectors by provider?
Most platforms set the selector for you. You publish the record they tell you to publish, and the selector is whatever they chose. These are the documented defaults.
| Provider | Selector | DNS record type | Notes |
|---|---|---|---|
| Google Workspace | TXT with the public key | Default prefix is google; a second selector, often google2, is used during rotation | |
| Microsoft 365 | selector1, selector2 | CNAME to a Microsoft-hosted key | Two selectors let Microsoft rotate keys with no DNS change from you |
| SendGrid | s1 | CNAME | SendGrid commonly uses s1, s2 and similar short labels |
| Mailchimp / Mandrill | k1, k2 or mandrill | TXT or CNAME | Varies by account setup; check the platform's DKIM page |
| Amazon SES | Custom, often a generated name | CNAME (Easy DKIM) | SES generates the selector names for you |
Google's setup documentation states the default prefix selector is google, so a Workspace domain publishes its key at google._domainkey.example.com. Microsoft 365 instead asks for two CNAME records: newer custom domains point to targets ending in dkim.mail.microsoft, while older setups use targets such as selector1-contoso-com._domainkey.contoso.onmicrosoft.com.
One domain can have several of these live at once. A real-world example from the DKIM guides showed a single domain with google, selector1, s1 and a fourth selector all published simultaneously — one per sending service. That is normal, not a misconfiguration.
How do I find my DKIM selector?
Look at a real message your domain sent. The selector is in the DKIM-Signature header, and it is also the first part of the DNS record your provider asked you to publish.
- Send yourself a test email from the service you want to check, then open it in your mailbox.
- View the full headers. In Gmail, open the message, click the three dots and choose Show original. In Outlook, open the message and choose View message source.
- Find the DKIM-Signature header and read the
s=value up to the next semicolon. That value is your selector. - Build the DNS name as
selector._domainkey.yourdomain.comand check it with a DNS lookup. - Verify the record with our free DKIM checker, which queries the record and shows whether the key is valid.
You cannot list a domain's selectors from DNS, because DNS has no way to enumerate subdomains. If you inherited a domain and do not know which services send mail for it, check the headers of messages each service sends, or look at the DKIM setup pages of every platform connected to the domain.
What does a DKIM selector DNS record look like?
A selector's DNS record is a single TXT record at selector._domainkey.yourdomain.com. It starts with v=DKIM1, names the key algorithm in k=, and carries the base64 public key in p=.
A typical RSA record looks like this, with the key shortened:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC...
RFC 6376 section 3.6.2.2 requires one TXT record per selector name; if several TXT records exist at the same name, the result is undefined, so never publish two records for one selector. An empty p= value means the key is revoked. For Ed25519 keys, added by RFC 8463, the record uses k=ed25519 and the key is only 44 base64 characters, so it fits in one TXT string.
Key size matters. RFC 8301, which updated DKIM's crypto rules in 2018, says signers must use RSA keys of at least 1024 bits and should use at least 2048 bits. Google recommends 2048 bits when your DNS host supports it, and 1024 bits otherwise. Keys shorter than 1024 bits are no longer acceptable.
How do you rotate a DKIM key with selectors?
Selectors exist so you can rotate keys without downtime. The safe sequence is: publish the new key under a new selector, switch signing to it, wait, then remove the old record.
Never reuse a selector for a new key. RFC 6376 section 3.1 warns that reusing a selector makes it impossible to tell a message that failed because the key changed from a message that is actually forged. Use a fresh selector name each time, such as a date-based label like nov2026.
Microsoft 365 handles this for you: with two selectors live, it can switch signing from one to the other and rotate the keys behind the CNAMEs without any DNS change on your side. Google Workspace rotation is similar — generate a new key, publish it, then switch — but you do the DNS step yourself.
What mistakes break DKIM selectors?
Most DKIM failures traced to selectors are small DNS or naming errors, and they are easy to check once you know where to look.
- Two TXT records at one selector name. RFC 6376 leaves the result undefined, and receivers may fail the lookup entirely.
- A selector that points nowhere. A typo in the DNS name, or a record published at the wrong domain, means the receiver finds nothing and DKIM fails.
- Reusing a selector for a new key. Old messages in transit can no longer verify, and receivers cannot distinguish rotation from forgery.
- Deleting the old selector too early. Mail already sent with the old key is still in transit; give it at least 48 hours.
- Forgetting a sending service. A marketing platform or helpdesk that signs with its own selector needs its own record, or its mail fails DKIM.
- A 1024-bit key split across TXT strings. Long keys need proper multi-string TXT records; a broken paste is a common cause of lookup errors.
If DKIM is failing, paste a message's headers into our email header analyzer to see which selector was used and whether the signature passed. Then check that exact selector name in DNS.
How does the DKIM selector affect DMARC?
The selector itself does not change DMARC alignment, because DMARC compares domains, not selectors. But a broken selector breaks DKIM, and that can break DMARC for a domain that depends on DKIM to pass.
DMARC passes when either SPF or DKIM passes and aligns with the From domain. Many domains rely on DKIM because it survives forwarding, while SPF often does not. If your only DKIM signature fails because its selector has no DNS record, DMARC may fail too.
With a p=reject policy, that failed mail gets rejected. Check your setup with the free DMARC checker.
Read our guide to what DMARC is for the full policy path, or the DKIM selector guide from DMARC+ for a second worked example.
The bottom line
A DKIM selector is a short label that tells receivers exactly which public key to fetch. Read it from the s= tag, build the name selector._domainkey.domain, and you can find, test and rotate any key a domain uses.
Keep one selector per sending service, use 2048-bit keys where your DNS host allows, and rotate under a fresh selector name. You can verify any selector in seconds with the free DKIM checker.
Frequently asked questions
What is a DKIM selector in simple terms?
It is a label, such as google or selector1, that tells a receiving mail server which public key to fetch for a signed message. The receiver combines it with the signing domain to build a DNS address, then checks the signature against the key published there.
Where is the DKIM selector in an email?
Open the full message headers and look for the DKIM-Signature header. The value after s= is the selector, and the value after d= is the signing domain. In Gmail, open a message, click the three dots, and choose Show original.
What is the DKIM selector for Google Workspace?
The default selector prefix is google, so the public key lives at google._domainkey.yourdomain.com. Google also uses a second selector, often google2, during key rotation or advanced setups.
What are selector1 and selector2 in Microsoft 365?
They are the two selectors Microsoft 365 uses for DKIM. Each is published as a CNAME record pointing to a Microsoft-hosted key, and the pair lets Microsoft rotate keys without you changing DNS records.
Can a domain have more than one DKIM selector?
Yes, and most domains do. Each sending service — Google Workspace, Microsoft 365, a marketing platform, a transactional mail API — uses its own selector and key pair, so several selectors can be live at the same time.
Can I list all the selectors for a domain?
No. There is no DNS query that lists selectors. You find them in the s= tag of real messages sent from the domain, or in each sending platform's setup documentation.
How often should I rotate a DKIM key?
Rotate at least once a year, and immediately if a private key may have leaked. Publish the new key under a new selector first, switch signing to it, wait, then remove the old record.
What happens if the DKIM selector has no DNS record?
The receiver cannot fetch a public key, so DKIM verification fails for that message. If DMARC is set to reject, the message may be rejected or sent to spam, depending on the receiver's policy.
Sources
- RFC Editor — RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- DMARC+ — What Is DKIM? Signatures, Selectors and Key Sizes
- DNSnexus — DKIM Selector Explained: Find & Test Your Key
- Email Validation — DKIM Selectors and Key Rotation: A Practical Guide
- DMARC Report — What is DKIM? DomainKeys Identified Mail Explained
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 6376 sections 3.1 and 3.6, RFC 8301 key-size rules, and Google and Microsoft 365 DKIM documentation.
How we write and fact-check →