Check DKIM Record: Find Your Selector and Key Length

, by xura.tools team

TL;DR: A DKIM key lives at <selector>._domainkey.<domain>. Find the selector in the s= part of a received email's DKIM-Signature header, then look it up:

dig +short TXT google._domainkey.example.com

A good record looks like this:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...

There is no DNS query that lists all selectors of a domain, so any "DKIM checker without selector" is guessing common names. Our mail check guesses the common ones for you.

How DKIM works, short version

DKIM is defined in RFC 6376. Your mail server signs each message with a private key. It adds a DKIM-Signature header that says which domain signed (d=) and which key it used (s=, the selector). The receiver builds a DNS name from those two and fetches the public key:

s=google  +  d=example.com   ->   google._domainkey.example.com

The selector exists so one domain can have many keys. Google Workspace signs with one, your newsletter tool with another, and you can rotate keys without breaking mail in flight.

Step 1: find the selector in an email header

Send yourself an email from the domain, then open the raw source:

Look for the DKIM-Signature header. It looks like this (example values):

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=example.com; s=google;
        h=from:to:subject:date:message-id;
        bh=...; b=...

d=example.com is the signing domain. s=google is the selector. There can be more than one DKIM-Signature header, for example one from your provider's own domain and one from yours. You care about the one where d= matches your From: domain, because that's the one DMARC uses.

The receiver's result is in Authentication-Results. Gmail shows the selector there too:

Authentication-Results: mx.google.com;
       dkim=pass [email protected] header.s=google header.b=AbCdEf12;

Step 2: look up the record

dig +short TXT google._domainkey.example.com

Some providers use a CNAME that points to a key they host. dig follows it and shows both lines. Here are real lookups from December 5, 2026:

$ dig +short TXT google._domainkey.github.com
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAj6T5sl/RwdSq..." "OPoA7dlR/A/pECr..."

$ dig +short TXT s1._domainkey.stripe.com
s1.domainkey.u2680008.wl009.sendgrid.net.
"k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRJjDdiZeTAd6hRY1B..."

$ dig +short TXT selector2._domainkey.microsoft.com
selector2-microsoft-com._domainkey.microsoft.onmicrosoft.com.
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCPkb8bu8RGWeJGk3hJ..."

GitHub's key is longer than 255 characters, so DNS splits it in two strings. Receivers join them. Stripe's s1 selector is a CNAME to SendGrid. Microsoft's is a CNAME to its onmicrosoft.com domain.

What the tags mean

Tag Meaning
v=DKIM1 Version. Optional, but if present it must be first.
k=rsa Key type. rsa is the default. ed25519 is also defined (RFC 8463).
p= The public key, base64. Empty p= means the key is revoked.
t=s Strict: the i= identity must be the exact domain, not a subdomain.
t=y Testing mode.

Common DKIM selectors by provider

Provider Selector Record type
Google Workspace google (default) TXT
Microsoft 365 selector1 and selector2 CNAME to Microsoft
SendGrid s1 and s2 CNAME to sendgrid.net
Amazon SES (Easy DKIM) three random tokens CNAME to dkim.amazonses.com

Sources: Google Workspace DKIM setup, Microsoft 365 DKIM docs. The SendGrid one is from the real Stripe record above. Other tools often let you pick a name, so the header is still the only sure way.

For Microsoft 365, the CNAME target has changed format. Newer setups point to something like selector1-contoso-com._domainkey.contoso.n-v1.dkim.mail.microsoft, older ones to selector1-contoso-com._domainkey.contoso.onmicrosoft.com. Copy the exact value from the Defender portal or from Get-DkimSigningConfig. Don't type it by hand.

DKIM key length

RFC 8301 updated DKIM: signers must use RSA keys of at least 1024 bits and should use at least 2048. Gmail's sender guidelines say the same, 1024 minimum, 2048 recommended.

A quick way to tell from the record: a 1024-bit key starts with MIGfMA0 and a 2048-bit key with MIIBIjAN. For the exact size, decode it with OpenSSL:

dig +short TXT google._domainkey.github.com | tr -d '" \n' \
  | sed 's/.*p=//; s/;.*//' | base64 -d \
  | openssl pkey -pubin -inform DER -noout -text | head -1

Results for two domains on December 5, 2026:

google._domainkey.github.com    RSA Public-Key: (2048 bit)
s1._domainkey.stripe.com        RSA Public-Key: (1024 bit)

OpenSSL 3 prints Public-Key: (2048 bit) without the "RSA". So even big names still run 1024-bit keys. They still pass, but 2048 is the better choice when you rotate.

Defaults differ:

Some DNS panels choke on a 2048-bit key because its longer than 255 characters. The fix is to split it into two quoted strings in one TXT record, not two records.

DKIM checker without selector: the honest answer

You can't list a domain's DKIM selectors from DNS. DNS has no "show me everything under _domainkey" query, and zone transfers are blocked almost everywhere. So any tool that checks DKIM without a selector is trying a list of common names. If the domain uses s=mx2024 or a random token, a guess won't find it.

Our mail check tries these: google, selector1, selector2, k1, default, s1, s2, mail, dkim and mxvault. If nothing shows up, it tells you to read the s= from a real header. That's the only reliable way.

How to check yours

  1. Send a mail from your domain to a Gmail or Outlook inbox.
  2. Read s= and d= from the DKIM-Signature header.
  3. Run dig +short TXT <s>._domainkey.<d>.
  4. Confirm p= is not empty and the key is 2048-bit.
  5. Or open /check/mail/yourdomain.com to see DKIM, BIMI and MTA-STS together. The mail tool page explains each row.

DKIM is half of DMARC alignment. Once DKIM passes for every sender, you can tighten your policy, see DMARC record examples. The other half is SPF, see SPF record examples.

Common mistakes

FAQ

How do I check my DKIM record?

Find the selector in the s= tag of a sent message's DKIM-Signature header, then run dig +short TXT <selector>._domainkey.<yourdomain>.

Can I check DKIM without the selector?

Not reliably. DNS can't list selectors, so tools try common names like google or selector1. If yours is custom, you need a real email header.

What is a DKIM record example?

google._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..." where p= is your base64 public key.

What DKIM key length should I use?

2048-bit RSA. 1024 is the minimum receivers accept. Anything below 1024 should fail.

How do I check DKIM status in Microsoft 365?

In the Defender portal under Email authentication settings, the DKIM tab, or in Exchange Online PowerShell with Get-DkimSigningConfig. Then confirm both selector1 and selector2 CNAMEs resolve.


Is your site affected? Run the free P-256 check.