What is DKIM?
DKIM (DomainKeys Identified Mail, RFC 6376) adds a cryptographic signature to each message you send. The sending server signs selected headers and the body with a private key; the receiver fetches the matching public key from DNS and checks the signature. A valid signature proves the message came from someone holding the domain's key and wasn't changed on the way.
The public key is a TXT record at selector._domainkey.domain. The selector lets a domain have several keys at once, one per service or per key rotation:
selector1._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOC..."
For DMARC, the domain in the signature (d=) must match the From domain. A service that signs with its own domain passes DKIM but not DMARC alignment.
Finding your selector
Selectors can be any name, so there's no way to list them from DNS. The quickest way to find yours is to open a message you sent, view its headers and look for the DKIM-Signature header. The s= tag is the selector and d= is the signing domain. The email header analyzer picks these out for you. Some common ones:
| Service | Selector(s) |
|---|---|
| Microsoft 365 | selector1, selector2 (CNAMEs to Microsoft) |
| Google Workspace | google (unless changed when setting it up) |
How to read the results
- Key type and size: RFC 8301 says signers should use RSA keys of at least 2048 bits, and receivers must not accept signatures made with keys under 1024 bits. A 1024-bit key still verifies but should be rotated. Ed25519 keys (RFC 8463) are also valid; because they're newer, publish one alongside an RSA key rather than instead of it.
- Delegated via CNAME: the selector points to a record the mail provider hosts and rotates for you, as Microsoft 365 does.
- Key revoked (empty p=): the selector exists but its key has been withdrawn on purpose, so signatures with it fail.
- Testing mode (t=y): receivers must treat messages signed with that key like unsigned mail, even when the signature fails (RFC 6376). Remove it once signing works.
- No key on common selectors: the domain may still sign with a custom selector. Find it in a message's headers and check it directly.
Common DKIM problems
The record is split or mangled
2048-bit keys are longer than the 255-character limit of a single TXT string, so they have to be split into several strings in one record. Some DNS panels add quotes, spaces or line breaks inside the key, which breaks it. Paste the key exactly as the provider gives it, and check it here after saving.
DKIM passes but DMARC fails
The signature uses the service's domain instead of yours. Turn on custom-domain DKIM in that service, which usually means publishing one or two CNAME records it gives you.
Signatures fail after forwarding or a mailing list
Mailing lists that change the subject or add a footer break the signature. That's expected. ARC (RFC 8617, still experimental) lets lists record the results the message had before they changed it, and some receivers use it.
Frequently asked questions
How often should I rotate DKIM keys?
There's no fixed rule; many organizations rotate once or twice a year, and services that delegate keys to you with CNAME records rotate them for you. Publish the new key under a new selector, switch signing to it, then remove or revoke the old selector after a few days.
Can I have more than one DKIM key?
Yes. Each service you send through should have its own selector, and messages can carry more than one signature.
Does DKIM encrypt my email?
No. DKIM only signs messages so receivers can verify them. Encryption in transit is TLS between mail servers; see the SSL/TLS certificate checker.
Why can't a checker list all my DKIM selectors?
DNS has no way to list the names under _domainkey, so a checker can only try likely selector names. The one you need is in the s= tag of a message's DKIM-Signature header.