Guide
What is DKIM? How it works and what a pass shows
DKIM (DomainKeys Identified Mail) lets a domain sign a message. The receiving server fetches the signer’s public key from DNS and checks it against the signed content. A pass shows two things: the signing domain claimed some responsibility for the message (RFC 6376 §1), and the signed parts have not changed since it was signed (§1.5). It does not show who wrote the message.
Three questions sit around DKIM and are easy to run together. Is a key published for the signer? Does this message’s signature verify against it? Does the signing domain align with the From domain?
How DKIM works in six steps
The sender signs each message with a private key and publishes the matching public key in DNS. The receiver fetches that key and checks the message against it. In order:
- The domain owner makes a key pair and publishes the public key as a DNS TXT record at
<selector>._domainkey.<domain>. RFC 6376 §3.6.2.1 says all DKIM keys live in a subdomain named_domainkey. A domain can publish several selectors, each with its own key. - The sending server chooses the header fields to sign and prepares them with a canonicalization,
simpleorrelaxed. RFC 6376 §5.4 requires the From header field to be among them. - It hashes the canonicalized body into
bh=, signs the header hash with its private key intob=, and names itself ind=and the key ins=. All of this goes into oneDKIM-Signatureheader. - The message travels. In RFC 6376’s words, "Message transit from author to recipient is through relays that typically make no substantive change to the message content and thus preserve the DKIM signature."
- The receiver reads
d=ands=, builds the name and fetches the key. It recomputes the body hash and compares it withbh=. It then checksb=against the key. That signature covers the headers listed inh=plus the DKIM-Signature header withb=left empty. - The receiver records a result, such as
dkim=passordkim=fail, and applies its own policy to it. DKIM results in Authentication-Results explains the values.
s= value, then _domainkey, then its d= value.DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
s=sel2026; t=1790000000; h=from:to:subject:date:message-id;
bh=AbCdEf...(abbreviated); b=GhIjKl...(abbreviated)
sel2026._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIB...(abbreviated)"| Tag | What it says |
|---|---|
a= | The signing algorithm. RFC 8301 says "rsa-sha1 MUST NOT be used for signing or verifying." |
c= | How the header and body were prepared before hashing. Without c=, RFC 6376 §3.4 applies simple to both. |
d= | The signing domain, the one claiming responsibility for the message. Required. |
s= | The selector, which names this key among the domain’s keys. Required. |
h= | The header fields the signature covers. From has to be in the list. |
bh= | The hash of the canonicalized body. |
b= | The signature itself. |
v= (record) | The key record’s version. RFC 6376 §3.6.1: "This tag MUST be the first tag in the record." |
p= (record) | The public key in base64. RFC 6376 §3.6.1: "An empty value means that this public key has been revoked." See empty p=. |
Three checks that are easy to confuse
A key published in DNS, a signature that verifies and a signing domain that aligns with the From domain are three separate results. Any one can be a yes while another is a no.
| Check | Question | Answered by | A yes means | A yes does not mean |
|---|---|---|---|---|
| The record exists | Is a key published for this selector and domain? | DKIM checker and record lookup (Validate) | A DNS record with a public key is there. | That any mail is signed with it. |
| The signature verifies | Does this message’s signature match its key and content? | DKIM header analyzer and signature verifier (Headers) | The signed headers and the body hash match what was signed, under the published key. | That the From address is genuine, or that the signer wrote the message. |
| The signing domain aligns | Is d= the From domain, or related to it? | The alignment line in Headers. | The two names are identical (strict) or share an organizational domain (relaxed). | A DMARC pass. The alignment line does not read any DMARC record. |
DMARC, defined in RFC 9989 (which obsoletes RFC 7489), knows two kinds of alignment. In relaxed alignment the From domain and the signing domain share an Organizational Domain, so a signature from foo.example.com aligns with mail from news.example.com. In strict alignment the two names are identical. The Organizational Domain is not simply the top-level domain. RFC 9989 §3.2.14 ties it to administrative authority, and §4.10 finds it with a DNS Tree Walk.
The alignment line in Headers compares the two names against a short built-in suffix list. It does not read the DMARC record, so it cannot say what policy the domain publishes or whether the domain asks for strict alignment. The selector finder shows the raw DMARC text it finds, without evaluating it.
Why DKIM matters
DKIM gives a receiver a domain that claims responsibility for a message and a way to see whether the signed parts changed. The large mailbox providers now ask senders for it as well.
The signature also lets a receiver see whether the signed headers and the body still match what the signer hashed (RFC 6376 §1.5). DKIM detects a change and does not prevent one. If a signed header or the hashed body is edited beyond what its canonicalization tolerates, the check fails.
Under the heading "Authenticated messages", Google’s sender guidelines list this: "Are less likely to be rejected or marked as spam by Gmail." Google’s page covers email authentication as a whole, so the line is not a claim about DKIM alone.
Text in quote marks is the provider’s own wording. The rest summarizes the same page. Google pages were read as shown in en-US, and all three providers were checked on 2026-10-29. These are provider policies for mail sent to that provider’s consumer mailboxes, not laws.
| Provider | Who it applies to | What it asks about DKIM |
|---|---|---|
| Google, all senders | Anyone sending to personal Gmail accounts. Google’s requirements apply only to that mail. | "Set up SPF or DKIM email authentication for your sending domains." Also: "Sending to personal Gmail accounts requires a DKIM key of 1024 bits or longer." |
| Google, bulk senders | "A bulk sender is any email sender that sends close to 5,000 messages or more to personal Gmail accounts within a 24-hour period." | "Set up SPF and DKIM email authentication for your domain." A DMARC record is asked for too, and the From domain has to align with the SPF or the DKIM domain. |
| Yahoo, all senders | All domains and consumer email brands hosted by Yahoo Mail. | "Implement SPF or DKIM at a minimum" |
| Yahoo, bulk senders | Yahoo sets no number: "We will not specify a volume threshold." | "Implement both SPF & DKIM" |
| Microsoft, Outlook.com | High-volume senders to Outlook.com accounts, effective May 5th, 2025. | "Domains sending more than 5,000 emails per day to Outlook.com accounts must fully be compliant with SPF, DKIM, and DMARC." |
Google’s FAQ gives the bulk-sender definition in the table. Its guidelines page words the line as "more than 5,000 messages per day". Microsoft words its threshold three ways across its pages ("5,000 or more", "more than 5,000" and "over 5,000"), and the pages we read give no date for rejection. Check the provider’s page before relying on a row.
Do I need DKIM?
Google, Yahoo and Microsoft all name DKIM in their sender requirements, in different strengths. Google and Yahoo accept SPF or DKIM from every sender and ask bulk senders for both, with a DMARC policy and a From domain aligned with the SPF or DKIM domain. Microsoft asks high-volume senders for SPF, DKIM and DMARC.
How much applies to you depends on who receives your mail and how much you send. DKIM itself sets no such rule. RFC 6376 §6.3 advises against deciding acceptability solely on a missing or unverifiable signature, because such rejection would cause severe interoperability problems.
If a platform sends mail for you, ask which domain it signs with. A valid signature from the platform’s own domain does not align with your From domain, which matters for the third check above. The provider pages for Google Workspace and Microsoft 365 list selectors and record forms, and how to set up DKIM covers the steps any sender follows.
What DKIM does not do
DKIM signs a message so a receiver can check it. It does not hide the message, vouch for its author or decide what a receiver does with a failure. Seven common questions:
- Does DKIM encrypt email?
No. RFC 6376 §1 says that no attempt is made to include encryption as part of the mechanism, so a signed message is as readable in transit as an unsigned one.
- Does DKIM stop phishing?
No. A signature need not relate to the From address at all. RFC 6376 §3.11 says, "This document does not require the value of the SDID or AUID to match an identifier in any other message header field." Even DMARC has limits: "DMARC does not attempt to solve all problems with spoofed or otherwise fraudulent emails." (RFC 9989 §2.2)
- Can bad mail pass DKIM?
Yes. RFC 9989 §4.4.1 notes that a message can bear a valid signature from any domain, even one used by a bad actor. A signed message can also be sent again by someone else with its signature intact. RFC 6376 §8.6 describes a spammer who has mail signed by a large provider and re-sends it, and §3.5 says the x= tag is not intended as an anti-replay defense.
- Does a failed check mean the message is rejected?
No. Signatures can fail through no fault of the signer, and RFC 6376 §6.1 concludes: "Therefore, a Verifier SHOULD NOT treat a message that has one or more bad signatures and no good signatures differently from a message with no signature at all." What a receiver does next is its own policy. The result it records, such as
dkim=fail, is explained in DKIM results in Authentication-Results.- Does forwarding break DKIM?
Not by itself. RFC 6376 Appendix B.2.3: "A Forwarder that does not modify the body or signed header fields of a message is likely to maintain the validity of the existing signature." A forwarder that edits the message is different: "Modification of email content invalidates most DKIM signatures, and many message-forwarding systems modify email content." (RFC 7960 §2.3)
- Does a footer or a Subject tag break the signature?
Yes, when the signature covers the part that changed. RFC 7960 §3.2.3 lists a Subject tag and a body footer among the changes mailing lists make, and says: "Any such modifications would invalidate a DKIM signature." To see it, paste a full message into the header analyzer, add a line to the body and analyze again. The body hash row fails and the header signature row still passes, provided the key is still published. Body hash mismatch covers the fix.
- Does a pass put the message in the inbox?
No. Authentication is one input to a receiver’s decision. RFC 9989 §1 says this of a DMARC pass: "Such authorization does not carry an explicit or implicit value assertion about that message or about the Domain Owner, and so a DMARC pass by itself does not guarantee that delivery to the recipient’s inbox would be safe or desirable."
Check it on your own domain
Look the record up first, then check a real message. A record with a key in p= shows that a key is published, and only a real message shows whether its signature verifies.
- Open the DKIM checker and record lookup (Validate) with your domain and selector. For a worked case, try proton.me with protonmail or fastmail.com with fm2. Both are CNAMEs to a 2048-bit key (checked 2026-10-29). Answers can be up to five minutes old, so a record you just published may not show yet.
- If you do not know the selector, the DKIM selector finder (Discover) tries a ranked list of known names, as in github.com. DNS cannot list selectors, so a miss does not mean the domain has no DKIM. Find a DKIM selector without an email header covers the other routes.
- Paste a full message, headers and body, into the DKIM header analyzer and signature verifier (Headers). It lists each signature’s tags, checks the body hash and the header signature separately and compares
d=with the From domain. Or send a test message to the address from DKIM test with a real email (Email).
Email reads only the header block, so it never checks the body hash. The sample message on Headers shows the layout and never verifies. If a check fails, body hash mismatch and signature did not verify say what to try.
Try it
Sources
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM)
- RFC 8601: Message Header Field for Indicating Message Authentication Status
- RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC)
- RFC 7960: Interoperability Issues between Domain-based Message Authentication, Reporting, and Conformance (DMARC) and Indirect Email Flows
- Google: Email sender guidelines
- Google: Email sender guidelines FAQ
- Yahoo Sender Hub: Sender Requirements & Recommendations
- Yahoo Sender Hub: FAQs
- Outlook.com Postmaster: Policies
- Outlook.com Postmaster: Announcements
- Microsoft Support: Fix NDR error 550 5.7.515 in Outlook.com
- RFC 2606: Reserved Top Level DNS Names