DKIM Checker |
A DKIM checker looks up the public key a domain publishes at selector._domainkey.domain, which
receivers use to verify the signature on its email, and checks the key's type, length and flags.
Find the Selector from an Email
Paste the headers of a message from the domain: the DKIM-Signature header names the domain (d=) and selector (s=).
Read in your browser: the headers are not sent anywhere.
To see headers: Gmail, ⋮ then "Show original"; Outlook, File then Properties (desktop) or "View message source"; Apple Mail, View then Message then All Headers. The email header analyzer also shows the DKIM result of the message.
What Is DKIM?
DKIM signs each outgoing message with a private key; the matching public key sits in DNS, so any receiver can check that the message wasn't changed and really comes from the signing domain.
The key is a TXT record (or a CNAME to your mail provider's record) at selector._domainkey.yourdomain.
Each mail service you use signs with its own selector. For DMARC, the signing domain (d=) must match
the From domain. Keys can't be listed from DNS, which is why a checker needs the selector.
| Service | Usual selectors |
|---|---|
| Google Workspace | google |
| Microsoft 365 | selector1, selector2 (CNAMEs to Microsoft's keys) |
| Mailchimp | k1, k2, k3 |
| SendGrid | s1, s2 |
| Proton Mail · Fastmail | protonmail, protonmail2, protonmail3 · fm1, fm2, fm3 |
How DKIM Works
The sending server signs the message; the receiving server fetches the public key from DNS and checks that the signature still matches.
s=) and domain (d=) in the signature tell the receiver where the key is.- Sign. The sending server hashes the body (
bh=) and the headers it chose to sign (h=, always including From), and signs the result with the private key (b=). - Add the header. It adds a
DKIM-Signatureheader naming the signing domain (d=) and the selector (s=). - Fetch the key. The receiver looks up the TXT record at
s._domainkey.d, for examplegoogle._domainkey.example.com. - Verify. If the signature matches, the signed headers and the body weren't changed on the way: DKIM passes for the
d=domain. For DMARC, that domain must also match the From address.
DKIM proves who signed a message and that it wasn't altered; it doesn't encrypt anything. A mailing list that adds a footer or edits the subject breaks the signature, which is why lists add an ARC seal (RFC 8617) to record the result they saw before changing the message.
DKIM Record Syntax, Tag by Tag
A DKIM record is a TXT record that starts with v=DKIM1 and holds the public key in p=; every other tag is optional.
google._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…"
| Tag (DNS record) | Meaning |
|---|---|
v=DKIM1 | Version. Optional, but if present it must come first |
k= | Key type: rsa (default) or ed25519 (RFC 8463). Ed25519 keys are short, but not every receiver checks them: sign with RSA as well |
p= | The public key, base64. Empty (p=) means the key is revoked |
t= | y: testing, receivers shouldn't treat a failure differently from no signature. s: the i= domain of the signature must equal d= exactly (no subdomains) |
h= | Hash algorithms accepted, such as sha256. SHA-1 must not be used (RFC 8301) |
s= · n= | Service type (email or *) · notes for people, ignored by receivers |
The DKIM-Signature header in each message uses its own tags:
| Tag (signature) | Meaning |
|---|---|
d= · s= | Signing domain · selector: together they give the key's DNS name |
a= | Algorithm: rsa-sha256 or ed25519-sha256 |
h= | The headers that were signed, in order |
bh= · b= | Hash of the body · the signature itself |
c= | Canonicalization, how strictly whitespace changes are tolerated: relaxed/relaxed is the usual choice |
t= · x= | When it was signed · when the signature expires (optional) |
A 2048-bit RSA key is longer than the 255 characters one TXT string can hold. DNS hosts split it into several quoted strings in the same record, which receivers join: that's correct. Two separate TXT records for the same selector are not.
How to Set Up DKIM: Google Workspace, Microsoft 365 and cPanel
Your mail service creates the key pair; you publish its public key (or a CNAME it gives you) in DNS, then switch signing on.
| Service | Steps |
|---|---|
| Google Workspace | Admin console › Apps › Google Workspace › Gmail › Authenticate email. Generate a 2048-bit record (selector google), add it as a TXT record at google._domainkey, wait for DNS, then click Start authentication. |
| Microsoft 365 | Microsoft Defender portal › Email & collaboration › Policies & rules › Threat policies › Email authentication settings › DKIM. Select your domain, publish the two CNAME records it shows (selector1._domainkey and selector2._domainkey) exactly as given, then turn on signing. |
| cPanel hosting | Email › Email Deliverability (your host must have it switched on). If cPanel runs your DNS, click Repair; if your DNS is elsewhere (Cloudflare, for example), click Manage and copy the suggested DKIM (TXT) record there. |
| Your own mail server (OpenDKIM, rspamd, Exim) | Create the key pair with the DKIM record generator, publish its TXT record at selector._domainkey, and give the private key to the signing software. |
| Mailchimp, SendGrid, other senders | In the service's domain authentication settings: it gives you CNAME records to publish, so it can sign with your domain instead of its own. |
Then send yourself a message and check the result above or in its headers. In the DNS host's name field, enter only selector._domainkey if the host adds your domain by itself; typing the full name there creates google._domainkey.example.com.example.com.
Common DKIM Errors and How to Fix Them
Most DKIM failures come from the DNS record, not the mail server: a missing key, a key broken when pasted, or a domain that doesn't match.
| Error | Cause | Fix |
|---|---|---|
| No key for selector | The record is at the wrong name (domain added twice), the selector is misspelled, or it was never published | Look the selector up above; publish the record at exactly selector._domainkey.yourdomain |
| Key invalid or can't be read | Spaces, line breaks or extra quotes inside p= after a copy and paste | Paste the key again as one string, or as several quoted strings in the same TXT record |
| Body hash did not verify | The message was changed after signing: mailing list footer, forwarding rule, security gateway, antivirus banner | Sign after the last system that edits mail; for lists, rely on ARC |
| DKIM passes, DMARC fails | The provider signs with its own domain (d=sendgrid.net), not yours | Set up domain authentication in that service, so d= is your domain |
| Weak or test key | 1024-bit RSA, or t=y left from testing | Generate a 2048-bit key under a new selector; remove t=y once it works |
| Fails after a key change | The old key was deleted while signed mail was still in transit | Rotate under a new selector and keep the old key for about a week |
How This DKIM Check Works
| Query | Live TXT query through Google Public DNS, no cache, at selector._domainkey.domain; a CNAME to the mail provider is followed |
| Without a selector | The default selectors of common services are tried (Google Workspace, Microsoft 365, Mailchimp, SendGrid, Proton, Fastmail, Zoho, HubSpot and generic names) |
| Key checks | Key type and length (RSA under 1024 bits refused, 1024 weak, 2048 good; Ed25519), test mode (t=y), revoked key (empty p=) |
| Not checked | Whether a real message's signature verifies: that needs the message itself (see the email header analyzer) |
| Same as | The DKIM part of the TXT lookup |
| Runs on | Our server in the US (AWS, N. Virginia). Pasted headers stay in your browser |
Last verified 10 November 2026.
Frequently Asked Questions
How do I check a DKIM record?
nslookup -type=txt selector._domainkey.example.com.How do I find my DKIM selector?
s= is the selector and d= the domain. Paste the headers in the box on this page and it reads them for you.What does DKIM stand for?
Why does DKIM fail?
Do I need DKIM if I have SPF?
Can a domain have several DKIM keys?
How often should I rotate DKIM keys?
p= value. Microsoft 365 has a "Rotate DKIM keys" button that does this for you; in Google Workspace you generate a new record under a new selector; for your own server, the DKIM record generator creates the new key.Should my DKIM key be 1024 or 2048 bits?
Next steps