You've been asked for your DKIM selector, or told to check your DKIM record. DKIM (DomainKeys Identified Mail) is a signature that the service you send email through adds to each message. The mail provider that receives the message, such as Gmail or Outlook, checks the signature with a public key. It gets the key from the DNS of the domain named in the signature.
The selector is the name of that key. The sending service picks it and writes it in each message, after s= in the DKIM-Signature header. A domain can have several keys, so each service that signs your mail has a selector.
DKIM is one of three checks, and each one checks one thing. SPF checks the server that sent the message. DKIM checks the signature, and passes for the domain named in it. DMARC checks whether SPF or DKIM passed for the domain in your From address, which is the address people read. So a message can pass DKIM and still fail DMARC, when the service signed with its domain.
How to find your DKIM selector
Start with a message from the service you were asked about.
- Send a test message from that service to a mailbox outside your company.
- Show the headers. In Gmail, click the three dots, then Show original. In Outlook on the web, click the three dots, View, View message details.
- Find
DKIM-Signaturein the headers. A signature can run over several lines. - Find
d=in the signature, and check that the domain after it is yours. - Read the value after
s=in the same signature. That is the selector for this service.
This is an example signature with an example domain:
Here the selector is google, and d= is the domain that signed the message. A message can have more than one signature, and DMARC counts the one where d= matches the domain in your From address. If no signature has your domain after d=, DKIM isn't set up for your domain at that service yet. The steps are under setting up DKIM.
Our free email header analyzer shows the signing domain and the selector of each signature when you paste the headers in.

You can also look in the service's DKIM settings. Google Workspace's default selector is google. Microsoft 365 uses selector1 and selector2, and they are the same for every Microsoft 365 customer. For other services, our provider pages cover where the signing setting is.
If you can't send a test message, our free SPF, DKIM and DMARC checker can try common names. Leave the selector blank, and it tries 16 names and stops at the first one that has a key. A key it finds may belong to another service you use, and it doesn't show that signing is turned on.
If it doesn't find a key, that doesn't mean DKIM is missing, because a selector can't be looked up from the domain alone. Either way, confirm the selector from a message.

How the selector points to your DKIM record
The mail provider builds a DNS name from two tags in the signature. The name is the selector after s=, then ._domainkey., then the domain after d=. For the example signature, it is this name:
The TXT record at that name is the DKIM record, and it holds the public key. Some services give you a CNAME for that name, which leads to a TXT record that the service keeps.
How to look up your DKIM record
Look the record up with the selector you found. Replace google with your selector and example.com with your domain. In a terminal, use dig:
On Windows, use nslookup:
This is the start of what dig prints for our record at domaincanary.com:
The lookup prints the record in quotes. A long key can come as several quoted pieces, and mail providers join the pieces before they read the key. If the name holds a CNAME, the lookup prints the name it leads to before the key.
Our free DKIM checker does the same lookup. Enter your domain and the selector, and it shows the record and whether the key is long enough.
What a good DKIM record looks like
A DKIM record is a list of tags with a semicolon after each one:
v=DKIM1 is the version. k= is the type of key. In the example it is rsa. Our checker also reads k=ed25519 keys, but receiving servers don't widely verify Ed25519 signatures yet. p= is the public key. If p= is empty, the key was revoked.
Under the standard for key length, RFC 8301, an RSA key has to be at least 1024 bits and should be at least 2048. So a 1024-bit key is allowed, and 2048 is the one to choose. Our DKIM checker warns about a 1024-bit key, as advice to move to 2048.
Some records have t=y, which marks the key as being tested. The DKIM standard asks mail providers to treat mail signed with a key like that as unsigned mail. Leave t=y out unless your service's instructions include it.
If the lookup doesn't find a record, or the record looks wrong
If the lookup doesn't find a record, compare the selector with the value after s= in a message. If they match, check the name the record has in your DNS panel. If the record isn't there yet, follow setting up DKIM.
A record looks wrong when it differs from the value your service gave you. Some DNS providers limit the length of a TXT record, and a long key can be cut short. Compare the whole value. If a message failed DKIM, our DKIM fail guide starts from that message's headers.
The tags in a DKIM signature
This is what each tag in the example signature holds:
| Tag | What it holds |
|---|---|
d= | The domain that signed the message. DMARC compares it with the domain in your From address. |
s= | The selector. With d=, it gives the DNS name of the key. |
a= | How the message was signed. The standard tells signers to use rsa-sha256, and tells mail providers to fail a signature made with rsa-sha1. |
h= | The headers that were signed. The From line is always one of them. |
bh= | A hash of the message body, made when the message was signed. |
b= | The signature. |
When DKIM passes and DMARC still fails
A service can sign with its domain and not yours. The signature passes DKIM, but the pass is for the service's domain, so DMARC doesn't count it for yours. In a message from that service, the signature has the service's domain after d=.
To fix it, turn on signing with your domain in that service's settings, so that d= is your domain. A subdomain of yours after d=, such as mail.example.com, counts by default. Our DMARC alignment guide covers how closely the domains have to match.
SPF works the same way. An SPF pass is for the domain in the bounce address, where failure notices go, and the service often puts its domain there. So SPF and DKIM can both pass for the service's domain, and DMARC still fails for yours. Our SPF guide covers the SPF half.
Setting up DKIM
You turn DKIM on at each service that sends email for your domain. Signing your staff email doesn't sign the invoice app's mail.
Google Workspace
- In the Google Admin console, open Apps, Google Workspace, Gmail, and click Authenticate email.
- Choose your domain and click Generate New Record.
- Keep the selector
google, and choose 2048 bits if your DNS provider supports keys that long. - In your DNS panel, publish the TXT record from Google at
google._domainkey. Google says DKIM can take up to 48 hours to start working. - Go back to the Admin console and click Start authentication.
Microsoft 365
- In the Microsoft Defender portal, open Email & collaboration, Policies & rules, Threat policies, Email authentication settings, and select the DKIM tab.
- Select your domain. Microsoft gives you two CNAME records, at
selector1._domainkeyandselector2._domainkey. - Publish both records in your DNS panel.
- Go back to the portal and turn on Sign messages for this domain with DKIM signatures.
Other services
Other services have the same setting under a name such as domain authentication or sender authentication. They give you a CNAME or a TXT record to publish. Our provider pages cover the services we've written up. For any other service, follow its DKIM instructions.
Test each service
After each setup, send a test message from that service to a mailbox outside your company. Google says you can't verify DKIM by sending yourself a message. Paste the test message's headers into our email header analyzer. For each signature, it shows the result, the signing domain, and whether that domain matches your From address.
Forwarded mail
When a message is forwarded, another server sends it on, and SPF may stop passing for your domain. The DKIM signature goes with the message, so DKIM can still pass. That is how a forwarded message can still pass DMARC.
DKIM fails after a forward when something on the way changed the signed parts, such as an added footer, a rewritten link or a mailing list's tag in the subject. Our body hash guide covers how to find what changed.
Rotating keys, and keys published as CNAMEs
Rotating a key means replacing it with a fresh one. With a CNAME record, the service rotates the key and your record follows, so your DNS stays as it is. Microsoft 365's two selectors are CNAMEs like that.
A key that you pasted into a TXT record stays as it was, so replacing it is up to you. In Google Workspace, you generate the next key with a different selector.
If a service retires a key and your DNS still has the old one, mail from that service fails DKIM. It fails DMARC as well when SPF doesn't pass for your domain either.
DMARC reports show when a sender's mail stops passing DMARC. Mail providers send them once you publish a DMARC record that asks for them. We read those reports for you. Your first domain is free, and we send you a digest every Monday. On a paid plan we email you as soon as we find out that a sender has started failing DMARC.
Check your DKIM record
We look up the DKIM record at your selector and check the key's type and length. We check SPF and DMARC too.
Free · No signup · The result names what to change
Questions
What is a DKIM selector?
It is the name of a DKIM key. The sending service writes it after s= in each signature. The mail provider that receives the message uses it to find the key in DNS, at a name such as google._domainkey.example.com. With selectors, a domain can have several keys, one for each service that signs its mail.
How do I find my DKIM selector?
Send a test message from the service to a mailbox outside your company, and show the message's headers. Find the DKIM-Signature header where d= is your domain. The value after s= in that signature is the selector. Google Workspace uses google by default, and Microsoft 365 uses selector1 and selector2.
Does DKIM encrypt email?
No. DKIM signs a message and doesn't hide what it says. With the signature, a mail provider can check which domain signed the message, and that the signed parts didn't change on the way.
Can I look up a domain's DKIM selector?
Not from the domain alone. The sending service picks the selector, and you can't list a domain's selectors from outside. Read it from a message the domain sent. Our free SPF, DKIM and DMARC checker tries 16 common names when you leave the selector blank. A key it finds may belong to another service. If it doesn't find a key, that doesn't mean DKIM is missing.
Is a 1024-bit DKIM key still valid?
Yes. Under the standard, an RSA key has to be at least 1024 bits and should be at least 2048. A signature made with a key shorter than 1024 bits isn't valid. Choose 2048 when you set DKIM up, if your DNS provider supports keys that long. Our DKIM checker warns about a 1024-bit key, as advice to move to 2048.
What do Gmail and Yahoo ask senders for?
Gmail asks every sender for SPF or DKIM. From anyone who sends 5,000 or more messages a day to Gmail, it asks for SPF, DKIM and a DMARC record. Yahoo asks bulk senders for the same three.
Keep reading
Checking as you go? The DMARC checker reads the policy you are moving up, the SPF and DKIM checkers show whether your senders will survive it, and the report analyzer reads an aggregate report you already have. No signup.
DomainCanary is a DMARC enforcement service that protects your domain from email spoofing without blocking your own mail.