Skip to content
Claim your free business email

DKIM record: what it is, how to find your selector, and how to check it

DKIM record: a key in a DNS record matching the signature stamped on an envelope.

A DKIM record is a TXT record in your domain’s DNS, at a name like s2026._domainkey.example.com, that publishes the public key receivers use to check the DKIM signature on your mail. The selector, s2026 here, comes from the s= tag of each signature. Check yours with our DKIM checker to see if the key is valid.

What is a DKIM record?

A DKIM record is the public half of a key pair your domain uses to sign email, published in DNS so any receiver can look it up (RFC 6376). When your sending service sends a message as you, it adds a DKIM-Signature header: a hash of the body and of chosen headers, signed with the private key the service holds. The receiver reads the domain (d=) and the selector (s=) from that header, fetches the key from <selector>._domainkey.<domain>, and checks the signature.

If the signature checks out, the receiver knows two things: the domain in d= approved this message, and the signed parts have not changed since it left. Neither depends on which server delivered it, which is why a DKIM signature usually survives forwarding when SPF does not. A pass is also one of the two ways a message can pass DMARC, as long as d= is your From domain or a domain under it. DKIM, SPF and DMARC explained covers how the three records work together, and the DKIM glossary entry has the short version.

Gmail, Yahoo and Outlook all ask for it. Google requires every sender to Gmail to pass SPF or DKIM, and anyone sending 5,000 or more messages a day to set up both. Yahoo asks bulk senders for both and every sender for at least one. Outlook requires SPF, DKIM and DMARC from domains sending over 5,000 messages a day.

What does a DKIM record look like?

A DKIM record looks like a short list of tags separated by semicolons: v=DKIM1, k=rsa and p= followed by a long base64 key. Here is a full DKIM record example, as a zone file writes it, with a real 2,048-bit key published as two strings:

s2026._domainkey.example.com.  3600  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyEIX7F1LJbOYslwF62Dnsi8kIxSWqbPnnK6eOz6po4UMOu7SWa34SNBy6gPY5UG6CeVWhpP+ZeUIGN3Iongvg3zBen1IiCxmiY0WKOvnWQ+bbaKXlTDUiLsZUl9pZZWsk33avkM5X7BQP0+skLkpKg3pBUL7j26eJdF9Yc5Vtmb5v+uo1q4Y7LO93q9XHWmh0" "UKhnAOR5pamHoXk/Lqg2AF4DUvxNDBv8CRKd2S4cF/oUXP0J6cKKj/TggZv7w6MqZwm1eVoi2DSAKJvjkBXiKljdAFo2/KwUSRtQxIGAzlrT6LW97S4cfvB3n11fiyA8od4LSQWkCJcOIgZw9KGuwIDAQAB"

Read left to right, that is the record’s name (selector s2026, then _domainkey, then the domain), its time to live in seconds, the type, and the value. In a DNS host’s form the same record is three fields: the name, the type, and the value pasted as one long line. The host splits a value over 255 characters into strings for you. Shortened, the value reads:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEF…IDAQAB
The tags of a DKIM key record
TagWhat it meansNeeded?
v=DKIM1The record's version. If it is there, it must be DKIM1 and must be the first tag.Optional
k=rsaThe key type: rsa (the default when the tag is missing) or ed25519.Optional
p=…The public key, base64. An empty p= means the key has been revoked.Required
t=yTesting mode: receivers may treat a failed signature as if it were unsigned. t=s asks for an exact domain match in the signature.Optional
h=sha256The hash algorithms this key may be used with. Leave it out unless you have a reason.Optional

The v= and k= tags are optional under RFC 6376 §3.6.1, so a record with only a p= tag is complete. Most services include all three, and there is no harm in it. What matters is that the p= value arrives whole: one character lost or added while pasting and the key no longer decodes.

What is a DKIM selector and where do I find mine?

A DKIM selector is the name a sending service gives one of your domain’s signing keys, and you find it after s= in the DKIM-Signature header of an email you sent. Selectors are what let one domain publish several keys side by side (RFC 6376 §3.1): your mailbox provider signs with one, your newsletter tool with another, your store with a third, each at its own <selector>._domainkey name.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  d=example.com; s=s2026; t=1763640000;
  h=from:to:subject:date:message-id;
  bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
  b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ...

Here d=example.com is the signing domain and s=s2026 the selector, so the key is at s2026._domainkey.example.com. There is no way to list a domain’s DKIM selectors from DNS, so the header is the reliable place to look. To see it, send yourself an email through the service, then open the message’s original source:

  • Gmail, in a browser: open the email, select More next to Reply, then Show original. The full header opens in a new tab.
  • Outlook.com, Outlook on the web and the new Outlook: open the email, select More actions at the top of the message, then View and View message details.
  • Yahoo Mail: open the email, select the More icon, then View Raw Message.

Search the source for DKIM-Signature. A message can carry more than one: the service often signs with its own domain as well as yours. The one that matters for your domain is the signature whose d= is your domain or a subdomain of it.

A DKIM selector for each sender

Every service that sends as your domain needs its own DKIM selector and record. Adding a new service never means editing an existing DKIM record: it means a new record at the new selector, which leaves the others untouched.

How do I check my DKIM record?

To check your DKIM record, enter your domain and selector in the DKIM checker: it reads the record from public DNS, follows any CNAME, and tests the key a receiver would use. Leave the selector blank and it tries a list of common selector names; enter the s= value from your header for a definite answer.

Each row of the result is a pass, a warning or a fail. The checker reports:

  • whether a record exists at the selector’s name, and whether it is at the wrong name, such as s2026._domainkey.example.com.example.com, which happens when a DNS host adds your domain to a name that already ends in it;
  • a CNAME chain that loops, runs longer than three steps, or points to a name with no key;
  • several TXT records at one name, and whether they are one key split into separate records;
  • quotation marks or backslashes left in the value from a zone file;
  • the tags: v= other than DKIM1 fails, v=DKIM1 anywhere but first is a warning, and an unknown k= fails;
  • the key: an empty p= (revoked), a value that is not base64, a key cut short, or a key that does not match k=;
  • the key length: an RSA key under 1,024 bits fails, 1,024 to 2,047 bits is a warning, 2,048 bits or more passes, and an Ed25519 key passes;
  • testing mode: t=y left on is a warning.

A revoked key is a fail when you named that selector, because mail signed with it fails DKIM, and a warning when the checker found it among the common names, because a retired selector is meant to look like that. Every failed row says what to change.

From a terminal, dig shows the same record. A TXT record comes back as its quoted strings; a CNAME shows the name it points to first, then the record found there:

$ dig +short TXT s2026._domainkey.example.com
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyEIX7F1LJbOYslwF62Dnsi8kIxSWqbPnnK6eOz6po4UMOu7SWa34SNBy6gPY5UG6CeVWhpP+ZeUIGN3Iongvg3zBen1IiCxmiY0WKOvnWQ+bbaKXlTDUiLsZUl9pZZWsk33avkM5X7BQP0+skLkpKg3pBUL7j26eJdF9Yc5Vtmb5v+uo1q4Y7LO93q9XHWmh0" "UKhnAOR5pamHoXk/Lqg2AF4DUvxNDBv8CRKd2S4cF/oUXP0J6cKKj/TggZv7w6MqZwm1eVoi2DSAKJvjkBXiKljdAFo2/KwUSRtQxIGAzlrT6LW97S4cfvB3n11fiyA8od4LSQWkCJcOIgZw9KGuwIDAQAB"
$ dig +short TXT mail2026._domainkey.example.com
mail2026.example-com.dkim.mailer.example.net.
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOC..."

The checker reads the published key. To see whether a particular message passed, read its Authentication-Results header in the same original source you opened above: dkim=pass with header.d= your domain is what you want to see. After a change, wait for the old record’s time to live to pass before you check again.

Should a DKIM record be TXT or CNAME?

Both are right: publish a TXT record when the service gives you the key itself, and a CNAME when it gives you a name to point at. The key always ends up in a TXT record; a CNAME only says where. A receiver that looks up mail2026._domainkey.example.com follows the CNAME to the service’s name and reads the TXT record there.

mail2026._domainkey.example.com.  3600  IN  CNAME  mail2026.example-com.dkim.mailer.example.net.

The difference is who can change the key. With a TXT record the key lives in your DNS, so rotating it means you publish a new record. With a CNAME the key lives in the service’s DNS, so it can rotate keys on its own schedule without asking you. Follow what the service shows in its setup screen, and copy it exactly: a CNAME target with one character wrong points to a name with no key.

A name that has a CNAME cannot hold any other record (RFC 1034 §3.6.2), so never publish a TXT and a CNAME at the same selector. If a DNS host refuses to save the CNAME, a leftover record at that name is the usual reason. Rasket gives each domain one TXT record at rasket._domainkey, holding a 2,048-bit key by default; your exact value is on your domain page, and the domains guide lists every record.

Should a DKIM key be 1024 or 2048 bits?

The right DKIM key length is 2,048 bits for RSA. RFC 8301 §3.2 says signers must use keys of at least 1,024 bits and should use at least 2,048, and that receivers must not accept a signature made with a key under 1,024 bits. Receivers must be able to verify keys from 1,024 up to 4,096 bits.

The mailbox providers set the same floor. Google requires a key of 1,024 bits or longer for mail to personal Gmail accounts and recommends 2,048 bits where your DNS host supports it; Yahoo asks for at least 1,024 bits. A 1,024-bit key is accepted today, but it is the minimum, and our checker marks it as a warning for that reason. A key under 1,024 bits fails DKIM everywhere that follows RFC 8301.

Why a 2,048-bit key is split into two strings

A single TXT string holds at most 255 characters, and a 2,048-bit key alone is about 392 in base64. So the value is published as one record holding two strings, as in the example above, and receivers join them with nothing in between (RFC 6376 §3.6.2.2). A DNS host that shows your value split in two is doing it right. Two separate records, each holding half, is what breaks it.

Ed25519 keys

RFC 8463 added Ed25519 keys (k=ed25519), which are short enough for one string. Not every receiver verifies them yet, so the RFC advises signing with an RSA key too: two signatures, two selectors, two records. If your service offers only one, use RSA at 2,048 bits.

To move from 1,024 to 2,048 bits, create the new key under a new selector, publish its record, switch signing to it, and remove the old record a few days later, once no message signed with the old key can still be waiting in a queue.

Why does DKIM fail?

DKIM fails when the receiver cannot get a usable key or the signature no longer matches the message, and four causes account for most failures: the body changed on the way, the selector is wrong, the key was split wrongly, or the key was revoked. The Authentication-Results header names the result, and often the reason:

Authentication-Results: mx.example.net;
       dkim=fail (body hash did not verify) header.d=example.com header.s=s2026

The body changed after it was signed

A mailing list that adds a footer, a forwarder that rewrites the subject, or a security gateway that rewrites links all change a signed part of the message, and the hash no longer matches. RFC 6376 §6.3 calls this “body hash did not verify”. Your record is fine; the message was changed after it left you. The signature still passes for mail that reaches people directly, so look at where the failing messages went before changing anything in DNS.

The selector is wrong

The receiver looks for the key at the selector the signature names. If the service signs with s2026 and you published the record at s2025, or typed the selector with a typo, there is no key at that name: “no key for signature” in RFC 6376’s words. Copy the selector from s= in a real header, not from memory.

The key was split wrongly across strings

A long value pasted as two separate TXT records gives the receiver two records instead of one key. So does a value with a stray space, quote or backslash in the middle, which happens when text is copied from a zone file into a DNS host’s value box. The key does not decode, and every signature fails. Paste the value as one line into one record and let the DNS host split it.

The key is revoked (empty p=)

An empty p= means the key was withdrawn on purpose, and RFC 6376 §3.6.1 tells receivers to treat every signature made with it as failed. It is the right way to retire a selector, as long as nothing still signs with it. If mail is still signed with a revoked selector, switch signing to your current one or publish the current key there.

s2019._domainkey.example.com.  3600  IN  TXT  "v=DKIM1; p="
Common DKIM problems and their fixes
ProblemWhy it happensFix
No record at the selectorThe selector is misspelled, the record went in under another name, or it has not reached public DNS yet.Copy the selector from s= in a real header, check the record's name at your DNS host, and wait for the time to live.
Record at the wrong nameThe full name was typed into a DNS host's name field, which added the domain again.Enter only s2026._domainkey as the name.
Several TXT records at the selectorA long key was saved as separate records instead of one record with two strings.Delete them and publish one TXT record holding the whole value.
The key does not decodeThe p= value was cut short, or picked up a space, quote or backslash when it was pasted.Copy the full value again from your sending service and replace it.
The CNAME points to a name with no keyThe target is mistyped, or the service has not finished setting up your domain.Copy the target again and finish the domain setup in the service.
The key does not match k=The record says rsa but holds an ed25519 key, or the reverse.Set k= to the key's real type, or publish the key the service gave you.
Body hash did not verifyA list, forwarder or gateway changed the message after it was signed.Nothing to change in DNS. Check where the failing messages were sent.
Key revoked (empty p=)The selector was retired, but mail is still signed with it.Sign with your current selector, or publish the current key at this one.
RSA key under 2,048 bitsThe key was made years ago, or with an old default length.Create a 2,048-bit key under a new selector and switch signing to it.

DKIM can also pass while DMARC fails. That happens when the only passing signature has a d= that is the service’s own domain rather than yours, so it does not align with your From address. The fix is a DKIM record for your own domain at the service, so it signs as you. Once every sender passes, the DMARC guide takes your policy from none to reject. Run the DKIM checker again after each change.

Check yours

DKIM checker

Is my DKIM key published, valid and long enough?

Published Updated 13 min readBy the Rasket team

Written for small business owners, developers and IT admins

Frequently asked questions

Do I need a DKIM record for every service that sends my email?

Yes. Each service signs with its own private key, so each needs its own public key in your DNS, at its own selector. Your mailbox provider, your newsletter tool and your store each get one record, and adding a service never changes the others.

Can a domain have more than one DKIM record?

Yes, as many as it has selectors. Each record sits at its own name: the selector, then _domainkey, then the domain. What a domain must not have is two TXT records at the same selector: receivers expect one key at each name and may fail on two.

How long does a new DKIM record take to work?

Usually minutes. A new record is visible as soon as your DNS host publishes it, but a name that was looked up before may stay cached as missing until its time to live runs out, often an hour. Wait that long before deciding it did not work.

What does t=y mean in a DKIM record?

It marks the key as being tested: receivers may treat a message whose signature fails as if it were unsigned rather than failed. It is useful during setup. Remove it once your mail passes DKIM, because some receivers give a testing key less weight.

If DKIM passes, does DMARC pass too?

Only when the passing signature's d= domain is your From domain or a domain under it. Many services sign with their own domain by default, which passes DKIM but does not count for your DMARC. A DKIM record for your own domain at the service fixes that.

How do I rotate a DKIM key?

Publish the new key under a new selector, switch signing to it, and delete the old record a few days later, once no message signed with the old key can still be in a queue. With a CNAME record the sending service rotates the key for you.

Can I look up all the DKIM selectors a domain uses?

No. DNS has no way to list the names under _domainkey, so a selector can only be read from the s= tag of a signed message or guessed. Checkers that try common names may miss a selector, so use the one from a real DKIM-Signature header.

Sources

  1. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures, sections 3.1, 3.5, 3.6 and 6 — IETF, read 2026-11-20
  2. RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM, section 3.2 — IETF, read 2026-11-20
  3. RFC 8463: A New Cryptographic Signature Method for DKIM — IETF, read 2026-11-20
  4. RFC 1034: Domain Names, Concepts and Facilities, section 3.6.2 — IETF, read 2026-11-20
  5. Email sender guidelines — Google, read 2026-11-20
  6. Trace an email with its full headers — Google, read 2026-11-20
  7. Sender Best Practices — Yahoo, read 2026-11-20
  8. Find delivery delays and identify sender — Yahoo, read 2026-11-20
  9. View internet message headers in Outlook — Microsoft, read 2026-11-20
  10. Strengthening Email Ecosystem: Outlook's New Requirements for High-Volume Senders — Microsoft, read 2026-11-20
  • DKIM — DKIM signs outgoing mail with a private key and publishes the matching public key in DNS, under a label called a selector.
  • DKIM, SPF and DMARC explained (2026 Full Guide) — What SPF, DKIM and DMARC each check, how to read the verdicts on a sent message, the records to publish, and what Gmail and Outlook.com require of senders.
  • SPF PermError too many DNS lookups: how to fix it — SPF PermError means receivers could not evaluate your SPF record, most often past the 10 DNS lookup limit. What counts, how to count, and how to fix it.
  • Gmail bulk sender requirements (2026 Full Guide) — What every Gmail sender must do, what bulk senders add, and Yahoo and Outlook.com side by side: SPF, DKIM, DMARC, unsubscribe, spam rate and error codes.
  • Domains — Add a domain, publish the generated record set and send from it. A 2048-bit DKIM key per domain, a custom return path, and verification that runs on its own.

Start sending this morning

Sign up, verify a domain and send your first email in minutes.