DKIM check: is your published key valid?
Enter a domain and a selector and see the published DKIM key: whether the record is valid, how long the key is, and whether receivers can use it to verify signatures. If you do not know the selector, leave it empty and we try the most common ones.
What the DKIM check covers
- Key record
- Whether there is exactly one key under selector._domainkey, and whether it is published directly or through an alias (CNAME) to the mail provider.
- Syntax
- Whether every tag is valid, the public key is present, and no quotation marks or other stray characters ended up in the record.
- Key length
- How many bits the RSA key has. Receivers refuse keys shorter than 1024 bits and consider 1024-bit keys weak today; the recommended size is 2048 bits.
- Cut-off keys
- Long keys are often truncated when they are pasted in; the record is then there, but every signature fails.
- Flags
- Whether the key is in test mode (t=y), revoked (empty p=), or limited to the domain without its subdomains.
- Selector search
- Without a selector, more than thirty names commonly used by mail services are tried.
How to set up DKIM
With DKIM the sending service signs every message with a private key, and the matching public key is published in your DNS. You therefore set it up once for each service that sends your mail.
- Turn on DKIM at the sending serviceIn the admin pages of your mail provider, newsletter or invoicing service, look for DKIM or "domain authentication". The service generates the key pair and shows you the DNS record to publish. Choose a 2048-bit key where there is a choice.
- Publish the record it gives youIt is either a TXT record at
selector._domainkey.example.comthat begins withv=DKIM1; k=rsa; p=…, or a CNAME at the same name that points to the service, which then looks after the key itself. Copy the name and the value exactly; a long key has to arrive whole. - Check the keyEnter the domain and the selector above. The check shows whether the key is found, complete and long enough. Give a new record a few minutes to reach the resolvers.
- Switch on signing and send a test messageMany services start signing only after you confirm that the record is published. Then send a message to a mailbox at another provider and open its source: the Authentication-Results header should say
dkim=pass. - Repeat for every senderEach service has its own selector, so their keys sit side by side without conflict. Once all your mail is signed, DMARC can rely on it.
Frequently asked questions
What is a DKIM selector, and where do I find it?
The selector is the name of the key: a domain can have several keys, one for each service that sends its mail. Your mail service gives it to you during setup. You can also read it from a message that was already sent: open the message source and look for "s=" in the DKIM-Signature header.
How long should a DKIM key be?
Use a 2048-bit RSA key. A 1024-bit key still works but is considered weak, and receivers ignore anything shorter. A 2048-bit key is longer than 255 characters, so in the TXT record it has to be split into several pieces; most DNS editors do that for you.
The record is there, yet DKIM fails. Why?
The most common cause is a key that was cut off when pasted in, or joined with quotation marks; the check reports both. Other causes: mail is signed with a different selector from the one you published, or the message was changed on the way (a mailing list adding a footer, for example).
Is DKIM enough without SPF?
For DMARC it is enough if one of the two passes, but set up both. DKIM survives forwarding and SPF does not; SPF in turn still protects when a service does not sign.
Related tools
- SPF Check
- Take a domain's SPF record apart: the include tree, the 10-lookup limit, and a test for a sender IP address.
- DMARC Check
- Is the domain protected against forged mail? DMARC policy, alignment, report addresses and the common mistakes.
- BIMI Check
- Will your logo show next to your mail? BIMI record, DMARC policy, SVG logo and certificate in one place.