Back to knowledge center
What Is DKIM? DomainKeys Identified Mail Explained (2026 Guide)
security David Lindgren 8 min8/6/2026

What Is DKIM? DomainKeys Identified Mail Explained (2026 Guide)

DKIM adds a cryptographic signature to every email your domain sends, so receiving servers can prove the message is genuine and unaltered. Here is how it works, how to set it up, and the mistakes that quietly break it.

Run the same check right now โ€” free

Enter your domain and get a 9-point audit โ€” DNS, SPF/DKIM/DMARC, SSL, security headers, dark-web exposure โ€” in 60 seconds.

No signup ยท <60s ยท GDPR/EU processing

DKIM (DomainKeys Identified Mail) is an email authentication standard, defined in RFC 6376, that attaches a cryptographic signature to every message your domain sends. The receiving mail server looks up your public key in DNS, recomputes the signature over the message body and selected headers, and confirms two things: the mail really came from your domain, and nobody altered it in transit. If you send email from your own domain, DKIM is no longer a nice-to-have. Google and Yahoo have required it from bulk senders since February 2024, and Microsoft began rejecting non-compliant high-volume mail to Outlook.com, Hotmail.com and Live.com on 5 May 2025 (Microsoft Defender for Office 365 blog).

Envelope and padlock representing a cryptographically signed email message

How DKIM actually works

DKIM is a public-key signature scheme wrapped around SMTP. The flow has four steps:

  1. You generate a key pair. The private key stays on your sending mail server or with your email provider. The public key is published in DNS.
  2. Your server signs outbound mail. It hashes the message body plus a chosen list of headers (From, Subject, Date and others), signs that hash with the private key, and inserts the result as a DKIM-Signature: header.
  3. The receiver fetches your public key. It reads the domain (d=) and selector (s=) from the signature header and queries <selector>._domainkey.<domain> for a TXT record.
  4. The receiver verifies. It recomputes the hash and checks it against the signature. A match means the signed parts of the message are authentic and unmodified.

Crucially, DKIM survives forwarding in a way SPF does not. SPF validates the connecting IP address, so it breaks the moment a mailing list or forwarder relays your message. A DKIM signature travels with the message itself, which is why DKIM alignment is usually the more durable half of a DMARC policy.

Anatomy of a DKIM record

A published DKIM record is a DNS TXT record at a selector-specific hostname. Here is a trimmed example for the selector s1 on example.com, published at s1._domainkey.example.com:

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

The tags you will meet most often:

TagWhere it appearsMeaning
v=DNS recordVersion, always DKIM1
k=DNS recordKey type: rsa (default) or ed25519
p=DNS recordThe Base64 public key. An empty p= revokes the key
t=yDNS recordTesting mode. Receivers should not penalise failures
d=Signature headerThe signing domain, the one DMARC aligns against
s=Signature headerSelector, so one domain can hold many keys
h=Signature headerThe list of headers covered by the signature
bh=Signature headerHash of the canonicalised body
x=Signature headerSignature expiry, as a Unix timestamp

One detail trips up almost everyone: a 2048-bit RSA public key is longer than the 255-byte limit for a single DNS character string, so it must be published as multiple quoted strings that the resolver concatenates. Some DNS panels do this silently, others do not, and a mis-chunked key fails verification without any visible error.

How to set up DKIM in five steps

  1. Generate a 2048-bit RSA key pair, or let your provider generate it. Google Workspace, Microsoft 365, Zoho, Mailgun, SendGrid, Postmark and Amazon SES all issue keys from their admin consoles.
  2. Pick a descriptive selector. Use one per sending source, for example google1, mg-2026a, zoho._domainkey. Never reuse a selector across two systems.
  3. Publish the TXT record at <selector>._domainkey.<yourdomain>. Wait for propagation, which usually takes minutes but can take up to the TTL of the parent zone.
  4. Enable signing in the sending platform. Publishing the key without turning on signing is the single most common half-finished DKIM deployment.
  5. Verify. Query the record from a terminal with dig TXT s1._domainkey.example.com +short, then send a test message to a mailbox you control and read the Authentication-Results: header. You want to see dkim=pass.

Repeat this for every system that sends as your domain: your mail host, your marketing platform, your invoicing tool, your helpdesk. Each one needs its own selector and its own key.

DKIM vs SPF vs DMARC

The three standards are complementary, not alternatives. DKIM proves integrity, SPF authorises the sending path, and DMARC ties either result back to the visible From address and tells receivers what to do on failure.

SPFDKIMDMARC
Defined inRFC 7208RFC 6376RFC 7489
What it validatesSending IP addressMessage signatureAlignment of SPF or DKIM with the From domain
Survives forwardingNoYesDepends on DKIM surviving
Crypto involvedNonePublic-key signatureNone
DNS records neededOne TXT per domainOne TXT per selectorOne TXT at _dmarc
Typical failure causeExceeding 10 DNS lookupsMissing or mis-chunked keyNeither mechanism aligned
Reporting built inNoNoYes, aggregate and forensic

Adoption of SPF, DMARC and DKIM across 5.5 million domains as of February 2026, showing SPF at 56.0 percent, DMARC at 30.4 percent and DKIM at 22.7 percent

DKIM remains the least deployed of the three. A February 2026 scan of 5.5 million domains put SPF at 56.0%, DMARC at 30.4% and DKIM at 22.7% (DMARCguard research). The authors note DKIM is likely undercounted, because a scanner can only probe common selectors and cannot discover custom ones.

Key length, rotation, and the replay problem

Use 2048-bit RSA. RFC 8301 deprecated signing keys below 1024 bits, and NIST SP 800-57 treats 2048 bits as the current floor for RSA. 1024-bit keys still verify at most receivers but are on borrowed time. Going to 4096 bits buys little and makes DNS publishing harder.

Rotate on a schedule. RFC 6376 recommends periodic rotation without naming an interval; M3AAWG's best common practices and most operators land on every 6 to 12 months, or quarterly in regulated environments. Rotation is safe if you do it in the right order: publish the new selector, sign with the new key while the old record is still live, confirm passes in your DMARC aggregate reports, then remove the old record.

Understand DKIM replay. In April 2025 a phishing campaign abused a legitimately signed Google message, re-sending it verbatim to new victims so it arrived with a valid dkim=pass from google.com (Red Sift analysis). Nothing about the signature was forged. The attack works because a DKIM signature says nothing about who sent the message or to whom. Two practical mitigations: oversign the headers that matter by listing them in the h= tag more times than they appear, which blocks an attacker from appending a second To: or Subject: header, and set a short signature expiry with the x= tag to shrink the replay window.

Common DKIM failures and what causes them

SymptomLikely causeFix
dkim=none in headersSigning not enabled at the senderTurn on DKIM in the platform, not just DNS
dkim=permerrorRecord missing, or p= mis-chunkedRe-publish as split quoted strings
dkim=fail on forwarded mail onlyA list or gateway rewrote the body or a signed headerAsk the forwarder to use ARC, or rely on SPF alignment for that path
Passes for one system, fails for anotherA sending source has no selector of its ownAdd a dedicated key per source
DMARC fails despite dkim=passThe d= domain does not align with the From domainSign with your own domain, not the provider's

Frequently asked questions

Does DKIM encrypt my email? No. DKIM signs, it does not encrypt. Anyone who intercepts the message can still read it. Transport encryption is TLS, and content encryption is S/MIME or PGP.

Can I have more than one DKIM record? Yes, and you usually should. Each selector is a separate record, so one domain can carry a key for every sending platform you use.

Does DKIM alone stop spoofing? No. A valid signature proves a message was signed by some domain, but receivers only act on that if a DMARC policy tells them to. DKIM plus DMARC at p=quarantine or p=reject is what actually blocks spoofed mail.

What happens when I delete a DKIM key? Any message still in flight that was signed with it will fail verification. To revoke deliberately, publish the record with an empty p= rather than deleting it outright, so receivers see an explicit revocation.

Is Ed25519 ready to use? Ed25519 signing is standardised in RFC 8463 and produces far shorter DNS records, but verifier support is still uneven. Dual-sign with RSA-2048 alongside it rather than switching outright.

Check your DKIM in 60 seconds

Most broken DKIM setups look fine from the admin console and only reveal themselves in the headers of delivered mail. FortifyNet's free scan reads your live DNS and reports on SPF, DKIM and DMARC together, alongside your SSL/TLS configuration, security headers and dark-web exposure. No signup required. Run a free scan of your domain and see what receivers actually see.

Frequently Asked Questions

#DKIM#email authentication#DMARC#SPF#DNS

Check your domain now

Run a free security audit and see if your domain has the issues described in this article.

Cookie Settings

We use cookies to improve your experience. You can choose which cookies to accept.