Skip to content

/ Glossary — Authentication

What is DKIM?

DomainKeys Identified Mail — a cryptographic signature proving your mail is really yours and unaltered. The durable half of authentication, because it survives forwarding. Here's how it works.

/ Definition

DKIM, or DomainKeys Identified Mail, attaches a cryptographic signature to every message you send, letting receivers verify two things: that the mail genuinely came from your domain, and that nothing in it was altered in transit. Your server signs each message with a private key; the matching public key is published in your DNS, where receivers fetch it to check the signature.

Unlike SPF, which checks the connecting IP, DKIM travels with the message itself — so it stays valid even when mail is forwarded, making it the more durable half of authentication. This is why DMARC accepts a pass from DKIM to cover the forwarding cases that break SPF. You can look up any domain's DKIM key with our DKIM checker.

/ In practice

How DKIM works

When you send a message, your server computes a signature over selected headers and the body using a private key, and attaches it as the DKIM-Signature header. The receiver reads the selector from that header, fetches the matching public key from a DNS record at selector._domainkey.yourdomain.com, and verifies the signature. If it checks out, the message is provably from a server holding your private key and provably unaltered. The selector exists because a domain can publish many keys at once — one per sending service, plus old keys kept during rotation.

Selectors and key length

Two details decide whether DKIM is set up well. The selector is the label that points to a specific key, and finding it is the main friction in DKIM — it's published in the s= tag of every signed message. Key length is the other: a 2048-bit RSA key is the current baseline, while a legacy 1024-bit key is now considered weak and may be treated as unsigned by Google and Yahoo. Our DKIM checker can probe common selectors for you and reports the key length so you can confirm you're not still on a weak key.

/ Rotation and algorithms

Why and how to rotate keys

DKIM keys should be rotated periodically — replaced with fresh keys on a schedule — because a key that never changes is a key that, if ever compromised, stays compromised indefinitely. Rotation is done by publishing a new key under a new selector, switching signing to it, and retiring the old one after a grace period so in-flight mail still verifies. The mechanics are simple but easy to get wrong: retire an old selector too soon and recently-sent mail fails verification. This is exactly the kind of operational detail that quietly breaks authentication when nobody owns it, and our DKIM checker helps you confirm a new key is published before you cut over.

RSA, ed25519, and testing mode

Most DKIM uses RSA keys, with 2048-bit the current baseline and 1024-bit now considered weak. A newer option, ed25519, is an elliptic-curve algorithm that produces much shorter keys with equivalent strength — excellent where supported, but because not every receiver validates it yet, it's usually published alongside an RSA key rather than instead of one. One more flag to watch is the t=y tag, which marks a key as being in testing mode and tells receivers to ignore DKIM failures; useful during setup, but a key left in testing indefinitely weakens the protection DMARC depends on. Rotating on a sensible cadence — many senders rotate every few months to a year — keeps the window of exposure small if a key is ever compromised, and pairing rotation with monitoring means a botched cutover surfaces immediately rather than silently failing mail for hours. The operational discipline of managing selectors, key lengths, and rotation across every sending source is precisely the kind of work that drifts when no single owner is responsible for it, and where a managed setup earns its place. Treating signing as an operated system rather than a one-time setup is ultimately what keeps it correct and dependable as the surrounding infrastructure changes around it.

/ Related terms

A published key is the start. Signing every source with an aligned key is the work.

We make sure every sending source signs with a strong, aligned DKIM key and keep you off legacy 1024-bit keys. Bring us your domain and we'll show you what's signing.

Book infrastructure review