ProductFree toolsLearnPricing AboutContact
Sign in Start free trial

What is DKIM?

A digital signature on every message that proves which domain sent it, and that nobody changed it on the way.

Updated:
Nov 2026
Read:
6 min
Level:
Beginner

What DKIM does

DKIM (DomainKeys Identified Mail) adds a digital signature to each message as it's sent. The receiving server checks the signature against a public key in the sender's DNS. If it verifies, the receiver knows two things: the message was signed by that domain, and the signed parts haven't changed since.

Unlike SPF, DKIM doesn't care which server delivered the message. The signature travels inside the message, so it usually survives forwarding.

How signing works

When the message is sentYour mail platform uses a private key, which only it holds, to sign the body and key headers such as From, Subject and Date. The signature goes into a DKIM-Signature header.
When the message arrivesThe receiver reads the signature, fetches the matching public key from DNS, and checks that the signature and the message still match.

Reading a DKIM signature

DKIM-Signature:
v=1; a=rsa-sha256; d=yourcompany.com; s=selector1;
h=From:To:Subject:Date; bh=2jUSOH9N...; b=AuUoFEfDxTDk...
d=
The signing domain. For DMARC, it has to match the From domain.
s=
The selector: which key to fetch. Together, s= and d= point to selector1._domainkey.yourcompany.com.
h=
The headers that were signed.
bh=
A fingerprint (hash) of the message body.
b=
The signature itself.

The DNS record

The public key lives at selector._domainkey.yourdomain, as a TXT record:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...

Each service that signs for your domain uses its own selector, so you can have several DKIM records without conflicts.

Microsoft 365 and Google Workspace

Microsoft 365Google Workspace
Before you turn it onSigns with your onmicrosoft.com domain, which doesn't alignSigns with a Google-owned domain, which doesn't align
Selectorsselector1 and selector2google by default
DNS recordsTwo CNAME records pointing to MicrosoftOne TXT record with the public key
Where to turn it onDefender portal → Email authentication settings → DKIMAdmin console → Gmail → Authenticate email

Step-by-step: DKIM in Microsoft 365 and DKIM in Google Workspace.

When DKIM fails

  • The message was changed on the way. Mailing lists that add a footer, or security gateways that rewrite links, break the signature. Receivers that support ARC can still trust the original result.
  • The DNS record is missing or wrong, for example the CNAMEs were never published, or a long key was cut off by the DNS host.
  • The message was never signed with your domain. The header shows dkim=none, or a pass for a service's own domain.

A pass for the wrong domain doesn't help. dkim=pass header.d=newsletter-tool.example means the service signed with its own domain. For DMARC, the d= domain has to match your From address. See DMARC alignment.

Keys and rotation

  • Use 2048-bit keys. 1024-bit keys still work but are weaker.
  • Rotate keys from time to time. Microsoft 365 rotates between its two selectors without any DNS change; elsewhere, publish the new key under a new selector before switching.
  • Remove keys you no longer use, and never publish DKIM records for domains that don't send email.

Common questions

#Do I need DKIM if I have SPF?

Yes. SPF breaks when messages are forwarded and never checks the From address. DKIM survives forwarding, and an aligned DKIM signature is the most reliable way to pass DMARC.

#Does DKIM encrypt my email?

No. It signs the message so receivers can confirm who sent it and that it wasn't changed. Anyone can still read the content; encryption in transit is handled separately by TLS.

#Do services like newsletter tools need their own DKIM?

Yes. Your mail platform only signs what it sends. Each service that sends as your domain needs DKIM set up for your domain in that service, with its own selector.