Setting Up DKIM
DKIM adds a digital signature to every message. The signature is created with a private key at your email provider. The public key lives in your DNS.
When a mailbox provider receives the message, it checks the signature against the DNS record. If they match, the message really came from your domain and was not changed during delivery.
What your provider gives you
DKIM records usually look like one of these:
- A CNAME record such as
provider._domainkey.example.compointing to a provider host. - A TXT record such as
selector._domainkey.example.comwith a public key.
A TXT record is a text entry in DNS. A CNAME points one DNS name to another. The selector is a name chosen by the provider, for example google, s1, or mail. Copy the host and value exactly.
Some providers use several CNAME records. Add all of them.
Setup
- Open your provider's domain settings.
- Find the DKIM section.
- Copy every DKIM record it shows.
- Add the records at your DNS provider.
- Wait for DNS to update.
- Return to your email provider and click its verify button.
Do not edit the public key. A single missing character breaks the signature.
Check it
Replace selector with the value from your provider:
dig TXT selector._domainkey.example.com
For a CNAME setup, use:
dig CNAME selector._domainkey.example.com
You should see the provider host or the public key. If the answer is empty, the record is missing or not live yet.
Common mistakes
| Mistake | Result | Fix |
|---|---|---|
| Wrong selector name | DKIM cannot be found | Copy the full host from the provider |
| Record added to the wrong domain | No effect | Add it to the sending domain, not the website domain if they differ |
| CNAME replaced with an IP address | Signature check fails | Keep it as a CNAME |
| Key changed at the provider | Old DNS record stops working | Replace the DNS record with the new value |
| Record edited by hand | Invalid key | Copy and paste the exact value |
DKIM and your provider
Most providers sign mail automatically after you add the records. You do not need to change anything in LetterPress.
If the provider gives you a choice between 1024-bit and 2048-bit keys, choose 2048-bit unless a legacy system requires the shorter key.
Next steps
- Publish a policy with DMARC.
- Confirm the sender record in SPF.
- If DKIM passes but mail still goes to the spam folder, read Emails going to spam.