Skip to main content

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.com pointing to a provider host.
  • A TXT record such as selector._domainkey.example.com with 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​

  1. Open your provider's domain settings.
  2. Find the DKIM section.
  3. Copy every DKIM record it shows.
  4. Add the records at your DNS provider.
  5. Wait for DNS to update.
  6. 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​

MistakeResultFix
Wrong selector nameDKIM cannot be foundCopy the full host from the provider
Record added to the wrong domainNo effectAdd it to the sending domain, not the website domain if they differ
CNAME replaced with an IP addressSignature check failsKeep it as a CNAME
Key changed at the providerOld DNS record stops workingReplace the DNS record with the new value
Record edited by handInvalid keyCopy 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.