DKIM Selector: How to Find Yours and Pick a Key Size
· 7 min read

A DKIM selector is the label that tells a receiving mail server which public key to use when it checks your signature. Most people never think about it until a record goes missing, a new sending tool needs its own key, or a deliverability check says "DKIM not found" for a domain that is clearly signing. This post covers how to find your DKIM selector, what the record contains, which key size to publish and how to swap keys without breaking mail that is already in transit.
For the big picture first, read SPF, DKIM and DMARC in plain English. Here we stay on DKIM.
What a DKIM selector does
Every DKIM-signed message carries a DKIM-Signature header. Two of its tags matter here: d= names the signing domain and s= names the selector. The receiver joins them and looks up a TXT record. RFC 6376 gives the pattern in section 3.6.2.1: all keys live under a _domainkey subdomain, so a signature with d=example.com and s=foo.bar sends the receiver to foo.bar._domainkey.example.com.
Selectors exist because one domain often needs several keys at once. The RFC's examples are office locations, signing dates, or a partner you delegate signing to for a while. In practice it happens whenever you send from more than one place: your mailbox provider and your newsletter tool each sign with their own key, and each key gets its own selector so they never overwrite each other. Whoever creates the key picks the name, usually the provider, and it means nothing to the receiver beyond "look here".
How to find your DKIM selector
The reliable way is to read it off a real message.
- Send an email from the address you care about to a mailbox you control, such as a personal account.
- Open the message and choose the option that shows the original or full headers. Every mail client has one, though the menu name differs.
- Find the
DKIM-Signatureheader and readd=ands=. - Look up the TXT record at
<s>._domainkey.<d>with any DNS lookup tool.
Two DKIM-Signature headers on one message is normal, since RFC 6376 allows several. Look at the one where d= is your own domain, because that is the one that can line up with your From address. Repeat this for every system that sends as your domain, since the selector for your main mailbox says nothing about your invoicing tool's.

What is inside the DKIM record
The value at that name is a short list of tags. According to RFC 6376 section 3.6.1, v=DKIM1 is recommended and must come first if you include it. k=rsa is the key type and the default. p= holds the public key in base64. A few details trip people up:
- An empty
p=means the key has been revoked. A record that exists but has no key will make signatures that use it fail. - A selector's TXT record must be unique. The RFC says that if several records exist for one selector name, the results are undefined.
- Long keys are split across several quoted strings in a single TXT record. Verifiers join the strings together with nothing between them (section 3.6.2.2), so a stray space inside the key is a bug.
- The
t=yflag marks a domain as testing DKIM. Receivers are told not to treat mail differently because of it, so don't leave it on once you are live.

Which DKIM key length to use
There are two numbers to know. Google's email sender guidelines say that sending to personal Gmail accounts requires a DKIM key of 1024 bits or longer, and that Google recommends 2048 bits where your provider supports it. The IETF standard says nearly the same thing. In RFC 8301 section 3.2, signers must use RSA keys of at least 1024 bits and should use at least 2048, and verifiers must not accept signatures made with keys shorter than 1024 bits.
So 1024 bits is the floor and 2048 is the target. If your provider still issues 1024-bit keys, ask whether it offers 2048.
The practical snag is DNS. RFC 8301 notes that widely used DNS software once handled only a single 256-octet string per TXT record, and keys much longer than 1024 bits don't fit in that. A 2048-bit key is longer than one 255-character string, so the record has to be split. Some DNS control panels do that for you and others reject it, so if a 2048-bit key won't save, check how your host handles long TXT values.
We found no source that recommends going past 2048. RFC 6376 section 3.3.3 warns that very large keys, 4096 bits for example, might not fit in a small DNS response and cost more CPU to sign and verify.
One more field to check in the headers is a=. RFC 8301 section 3.1 says rsa-sha1 must not be used for signing or verifying, so you want to see a=rsa-sha256.

Rotating keys without losing mail
Selectors are what make rotation painless. RFC 6376 section 3.1 describes the method: publish the new key under a new selector while the old one stays in DNS, switch your sending server to sign with the new private key, and remove the old record only after mail signed with it can no longer be in transit.
The same section carries an operations note that is easy to miss. Don't reuse a selector for a new key, because a receiver then can't tell a message that fails since the old key is gone from one that was forged. New key, new selector.
In practice:
- Generate a new key pair, 2048 bits if your provider allows it.
- Publish the public key at a new selector name and confirm it resolves.
- Switch the sender to the new selector.
- Wait for old signatures to clear their delivery window, then remove the old record.
The RFC says nothing about how often to rotate, and we couldn't find a source that gives a required interval. Pick one you will actually keep, because a rotation nobody has ever tried is a problem on the day a vendor tells you a key leaked.

DKIM selector, alignment and what Google asks for
Signing is only half of it. For a message to pass DMARC through DKIM, the domain in d= has to line up with the domain in your From address. Google's guidelines say senders of more than 5,000 messages a day to Gmail need the From domain aligned with either the SPF domain or the DKIM domain, and that all senders need SPF or DKIM in place. Our post on DMARC aggregate reports shows where failures of that kind turn up.
That is why the selector hunt above asks you to look at d=. A valid signature from your email provider's domain proves the provider signed the message, but it doesn't help your own domain's DMARC result.
What InboxRampUp checks
InboxRampUp tests DKIM as part of its live domain health checks for the domain behind each mailbox, and the free deliverability checker runs the same sort of test on any domain. The checker asks whether a DKIM public key is published. It probes the common selectors used by Google, Microsoft and most email service providers, or the one you give it in the advanced custom-selector field.
So if your sending tool uses an unusual selector name, the checker may not find it unless you enter that name. It confirms that a key is published but doesn't read a real message and verify its signature, which means the headers of a test email remain the final word. What a domain health check covers goes through the other tests.
FAQ
How do I find my DKIM selector?
Send a message to yourself, open the full headers and read the s= value in the DKIM-Signature header. Combine it with d= to get the DNS name <s>._domainkey.<d>.
Can a domain have more than one DKIM selector?
Yes. RFC 6376 says the number of keys and selectors is up to the domain owner, and a domain that sends through several tools will usually have one per tool.
Is a 1024-bit DKIM key still acceptable?
For now, yes. Google requires at least 1024 bits for personal Gmail and RFC 8301 sets 1024 as the minimum. Both point to 2048 as the better choice.
Why does a checker say DKIM not found when my mail is signed?
Often the tool looked up a different selector than the one your mail uses. Read s= from a real message and test that selector directly.
Do I need to rotate DKIM keys on a schedule?
The standard doesn't require one. It gives you a safe method: a new selector, both keys published for a while, then the old one removed.
Check your DKIM before the next campaign
Run your domain through the free deliverability checker to see whether a DKIM key is published, and use the advanced field if your tool signs with a custom selector. When the DNS side is clear, start the free trial with no credit card, connect a mailbox and let the ramp build reputation on top of it.
- DKIM selector
- DKIM key length
- DKIM
- email authentication
- deliverability