What is DKIM
DKIM (DomainKeys Identified Mail, RFC 6376) adds a cryptographic signature to each outgoing message. The sending server signs selected headers and the body with a private key. The matching public key is published in DNS.
Each key lives at a selector, a name chosen by the sender and published at selector._domainkey.example.com. A domain can have many selectors, one for each service that sends its mail. The selector used for a message is in the s= tag of its DKIM-Signature header.
Why it matters
A valid DKIM signature proves the message came from a server holding the domain's key and was not changed on the way. Unlike SPF, DKIM survives forwarding, which makes it the more reliable way to pass DMARC.
Large mailbox providers require DKIM for bulk senders. Unsigned mail, or mail signed only with the provider's own domain, is more likely to land in spam.
What a correct record looks like
Publish the public key as a TXT record at the selector your mail provider gives you. Use a 2048-bit RSA key.
DNS record
google._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu5oIwBz..."
Long keys are split into several quoted strings in one TXT record. That is normal, DNS joins them.
DNS cannot list the selectors of a domain. Enter the selector your provider signs with to check that key. Without one, this checker tries common selectors such as google, selector1, selector2, default, k1 and s1, and a key that is not found may still exist under another name.
Common problems
- No key at the selector in use
- Your provider signs with a selector that has no DNS record. Copy the record from the provider's admin console.
- Revoked key
- An empty p= tag means the key was revoked. Mail signed with it fails DKIM. Publish the current key, or remove the record if the selector is no longer used.
- Invalid key
- A truncated or broken p= value cannot be parsed. Republish the record exactly as the provider shows it, without extra quotes or line breaks.
- Short key
- 1024-bit keys are still accepted but are weak. Rotate to a 2048-bit key.
- Signed with the provider's domain
- If the d= domain in the signature is the provider's domain, DKIM does not align for DMARC. Set up signing with your own domain.