Keep your bounce rate under 3%. Verify your email list with catch-all email verifier Giggal.ai

Glossary · Authentication

What is DKIM?

The short answer

DKIM (DomainKeys Identified Mail) is a digital signature that your mail server adds to every email you send. The receiving mail server checks the signature against a key published in your domain's DNS. If it matches, the email really came from your domain and was not changed on the way.

Also called: DomainKeys Identified Mail, DKIM signature, DKIM record

By · Updated · 4 min read

DKIM: what to remember

  • DKIM is a signature on your email. It proves the email came from your domain and was not changed after it was sent.
  • DKIM uses two keys: a secret key that signs the email and a public key in your DNS that anyone can use to check it.
  • DKIM does not hide or encrypt your email. It only proves where it came from.
  • Gmail, Yahoo and Outlook expect senders to use DKIM. Without it, more of your email goes to spam.

What does DKIM mean?

DKIM stands for DomainKeys Identified Mail. The name is a mouthful, but the idea is simple: DKIM is a signature on your email.

Think of an old letter closed with a wax seal. The seal has the sender’s own stamp on it. If the seal is unbroken and the stamp is the right one, you know two things: the letter really came from that person, and nobody opened it and changed it on the way.

DKIM does the same for email. Your mail server stamps every email with a signature. The receiving mail server checks the stamp. If it is correct, the email is genuine.

DKIM is one of three checks that together are called email authentication. The other two are SPF and DMARC.

How DKIM works, step by step

DKIM uses two keys that belong together.

  • A private key, which is secret and stays on your mail server.
  • A public key, which sits in your domain’s DNS where anyone can read it.

Here is what happens when you send an email:

  1. You press send.
  2. Your mail server uses the private key to create a signature from the contents of the email.
  3. It adds that signature to the email as a hidden line called DKIM-Signature.
  4. The receiving mail server reads the signature. It finds your domain and a short label called the DKIM selector, which tells it where your public key is.
  5. It fetches the public key from your DNS and uses it to check the signature.
  6. If the signature matches, DKIM passes. If the email was changed, or the key is wrong, DKIM fails.

A DKIM example

A DKIM setup has two visible parts.

1. The DKIM record in your DNS. This is the public key.

Name:   google._domainkey.example.com
Type:   TXT
Value:  v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOC...

2. The DKIM signature on each email. You can see it in the email header.

DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=google; ...

In the signature, d=example.com is the domain that signed the email and s=google is the selector. When the receiving server checks it, the result is written into the header as dkim=pass.

DKIM vs SPF vs DMARC

These three work as a team, and each has its own job.

What it checks Simple picture
SPF Was the email sent from a server you allow? A guest list at the door
DKIM Is the email genuine and unchanged? A seal on the letter
DMARC What should happen if SPF and DKIM fail? Instructions for the doorman

DKIM has one big advantage over SPF: it stays with the email. If your email is forwarded to another address, SPF usually breaks, but the DKIM signature still passes. That is why DMARC accepts either one.

Why DKIM matters for cold email

Gmail, Yahoo and Outlook all expect senders to sign their email. An email with no DKIM signature looks careless at best and forged at worst, so it is much more likely to land in spam.

With cold email this matters twice as much. The person you are writing to has never heard of you, so the inbox provider has nothing to go on except the technical signals. DKIM is one of the first things it looks at.

There is one more catch. If you never set up DKIM for your own domain, Google and Microsoft still sign your email, but with their domain, not yours. That signature passes, yet it does nothing for your domain. A proper DKIM setup signs with your own domain name.

Every domain you send from needs its own DKIM record. PureMail’s team adds it for each domain when it sets up your Google Workspace inboxes or Microsoft 365 inboxes.

How to set up DKIM

The steps are the same idea on every provider.

  1. Create the DKIM key in your email provider’s admin panel. Google gives you one TXT record. Microsoft gives you two CNAME records.
  2. Add the record to your DNS, exactly as shown.
  3. Wait for the record to be visible, which can take from a few minutes to a day.
  4. Switch DKIM on in the admin panel. This step is easy to miss.
  5. Send a test email and check that the header says dkim=pass with your domain.

Our guide to setting up SPF, DKIM and DMARC walks through each step.

Common DKIM mistakes

  • Adding the record but never switching DKIM on. The record alone does nothing until signing is turned on.
  • Copying the key with a line break or a missing character. DKIM keys are long, and one wrong character makes DKIM fail.
  • Signing with the provider’s domain. If the header shows d= followed by a Google or Microsoft domain, your own DKIM is not active yet.
  • Using a short key. Choose a 2048-bit key when your provider offers it.
  • Setting up DKIM on one domain only. Each sending domain needs its own.

FAQ

DKIM: questions people ask.

01

What does DKIM stand for?

DKIM stands for DomainKeys Identified Mail. In plain words, it is a way to identify the domain an email came from, using a pair of keys.

02

What is DKIM in simple words?

DKIM is a signature on your email, a bit like a seal on a letter. Your mail server signs each email, and the receiving server checks the signature. If the check passes, the receiver knows the email came from your domain and nobody changed it on the way.

03

What is the difference between DKIM and SPF?

SPF is a list of servers that are allowed to send email for your domain. DKIM is a signature attached to the email itself. SPF checks where the email came from, and DKIM checks that the email is genuine and unchanged. Most senders use both.

04

Do I need DKIM for cold email?

Yes. Gmail, Yahoo and Outlook expect email to be signed, and unsigned cold email is far more likely to land in spam. Every domain you send cold email from needs its own DKIM record.

05

How do I check if DKIM is working?

Send an email to your own Gmail address, open the message, choose Show original and look for the line that says DKIM. It should say PASS with your own domain next to it. If it says FAIL, or shows a domain that is not yours, your DKIM setup needs fixing.

06

Does DKIM encrypt my email?

No. DKIM does not hide the contents of your email. Anyone who could read it before can still read it. DKIM only proves who sent it and that it was not changed.

Still have a question? support@puremail.ai · contact us

Your next reply is one order away.

Google Workspace and Microsoft 365 inboxes from $2.90 a month, set up and connected to your sequencer today.