בס״ד

DKIM Checker

A DKIM record is a public key published as a TXT record at selector._domainkey.yourdomain.com, and the matching private key signs every message your mail server sends. Our DKIM checker fetches the key for a selector and confirms it parses. You find the selector in the s= tag of the DKIM-Signature header of any message you have sent.

Common selectors:

The selector is the s= tag in the DKIM-Signature header of any message the domain has sent.

$ curl "https://api.dnsx.dev/email/dkim/example.com?selector=google"

How do I find my DKIM selector?

A selector cannot be discovered from DNS. TXT records are only returned for an exact name, and there is no way to list every name under _domainkey. So the reliable method is to read the selector off a message the domain has actually sent. Every signed message carries a DKIM-Signature header, and the selector is its s= tag. The d= tag in the same header is the signing domain, which is what you should enter above if it differs from the From domain.

  • Gmail: open the message, click the three-dot menu, choose Show original. The summary at the top lists DKIM with the signing domain, and the raw headers below contain the DKIM-Signature line.
  • Outlook (desktop): open the message in its own window, then File, Properties, and scroll the Internet headers box.
  • Outlook on the web: open the message, click the three-dot menu, View, View message source.
  • Apple Mail: View, Message, All Headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=google;
        h=from:to:subject:date:message-id; bh=...; b=...
                                             │           │
                                       signing domain  selector  ->  google._domainkey.example.com

Without a sample message, the selector is usually predictable from the provider. The quick buttons above the form cover the common ones, and the table further down lists more.

Is a 1024-bit DKIM key still acceptable, or do I need 2048?

Use 2048 bits. RFC 6376 originally required verifiers to support keys from 512 to 2048 bits. RFC 8301 raised the floor in 2018: verifiers must accept 1024 to 4096 bits, must not accept less than 1024, and signers should use at least 2048. Gmail enforces the 1024-bit minimum. A 1024-bit RSA modulus is considered breakable by a well-resourced attacker, and a broken DKIM key lets that attacker sign mail as your domain that passes DMARC.

The old reason for staying at 1024 was DNS. A TXT record is made of strings no longer than 255 characters, and a 2048-bit key is about 392 characters of base64, so it has to be split across two strings. Every current DNS provider handles that, either automatically or by letting you paste the two quoted strings. Our tool reads the key length from the DER-encoded modulus itself rather than estimating from the record length, so a key that has been mangled during copy and paste shows up as failing to parse.

Ed25519 keys (RFC 8463) are 256 bits and far shorter in DNS, but receiver support is still incomplete, so a domain that uses them should dual-sign with RSA as well.

How do I rotate a DKIM key without breaking mail?

Selectors exist so that two keys can be live at once. Generate a new key pair, publish the public half under a new selector (for example, move from s2024a to s2025a), and confirm it resolves. Switch the mail server or provider to sign with the new selector. Wait at least a week, because mail already sent is verified when it is received, and a message stuck in a queue over a weekend still references the old selector. Then delete the old record, or better, publish it with an empty p tag, which RFC 6376 defines as a revoked key.

Rotate every 6 to 12 months and immediately after any suspicion the private key leaked. Providers that manage the key for you, such as Google Workspace and Microsoft 365, rotate automatically. Microsoft alternates between selector1 and selector2, which is why both must be published as CNAMEs.

Which DKIM selector does each email provider use?

ProviderSelectorNotes
Google WorkspacegoogleGenerated in the Admin console. 2048-bit by default.
Microsoft 365selector1, selector2CNAMEs to selector1-<domain>._domainkey.<tenant>.onmicrosoft.com. Microsoft rotates between the two.
Mailchimpk1, k2, k3CNAMEs to dkim.mcsv.net.
SendGrids1, s2CNAMEs to sendgrid.net when using automated security.
Amazon SESthree random stringsEasy DKIM publishes three CNAMEs to dkim.amazonses.com. Read them from the SES console.
Fastmailfm1, fm2, fm3CNAMEs to <selector>.<domain>.dkim.fmhosted.com.
Zoho MailzmailThe default suggestion. Any name you choose in the Zoho admin console works.
Postmark<date>pm, for example 20240101pmRotated automatically after DNS verification.
Proton Mailprotonmail, protonmail2, protonmail3CNAMEs to protonmail.domainkey.<id>.domains.proton.ch.
Self-hosted (OpenDKIM, rspamd, Exim)default, mail, dkimWhatever the administrator chose. Many guides use default.

Most hosted providers publish the key on their own domain and ask you to add a CNAME under _domainkey pointing at it. A lookup still works, because resolvers follow the CNAME and return the TXT record at the other end. Our tool shows the final record. If it comes back empty, the CNAME is usually pointing at a name the provider has not activated yet.

How do I check a DKIM record with dig?

Query the TXT record at selector._domainkey.domain. A 2048-bit key comes back as two quoted strings that the verifier joins together. A CNAME in the answer section before the TXT record is normal for hosted providers. The DNSX API returns the joined record and the parsed tags.

$ dig TXT google._domainkey.example.com +short
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..." "...IDAQAB"

$ curl -s "https://api.dnsx.dev/email/dkim/example.com?selector=google" | jq '.found, .parsed.key_type'

Frequently Asked Questions

What is a DKIM record?
A DKIM record is a TXT record published at selector._domainkey.yourdomain.com that holds the public half of a signing key. The mail server keeps the private half and signs every outgoing message with it in a DKIM-Signature header. Receivers fetch the public key from DNS and verify the signature, which proves the message came from a server holding the key and was not altered in transit. DKIM is defined in RFC 6376.
How do I find my DKIM selector?
Open the raw headers of any message the domain has sent and find the DKIM-Signature header. The selector is the value of its s= tag, and the signing domain is the d= tag. In Gmail use the three-dot menu and Show original. In Outlook open the message, then File, Properties, and read the Internet headers box. Selectors cannot be listed from DNS, which is why DNSX asks for one.
Should a DKIM key be 1024 or 2048 bits?
2048 bits. RFC 8301 requires verifiers to accept keys from 1024 to 4096 bits and recommends signers use 2048. A 1024-bit RSA key is within reach of a well-funded attacker, and Gmail rejects anything shorter than 1024. A 2048-bit key spans two 255-character TXT strings, which every DNS provider now supports.
What does the t=y flag in a DKIM record mean?
t=y marks the key as being in testing mode. RFC 6376 tells receivers to treat a signature that fails under a testing key the same as an unsigned message, and not to hold it against the domain. It exists for the first days of a deployment and should be removed once signing verifies, because some receivers give a t=y signature less weight.
How often should DKIM keys be rotated?
Every 6 to 12 months, and immediately if the private key may have leaked. Rotation is safe because selectors let two keys coexist: publish the new key under a new selector, switch the signer to it, wait a week for mail already in transit to be verified, then delete the old record. Providers that manage DKIM for you, such as Google Workspace and Microsoft 365, rotate on their own schedule.
What does an empty p= tag in a DKIM record mean?
An empty p tag means the key has been revoked. RFC 6376 section 3.6.1 defines it that way, so any signature that references the selector fails verification. Providers publish an empty p for retired selectors instead of deleting the record, so a lookup finds a record but the key is useless.

Related tools