Cleanbox
Features Blog Pricing Developers Tools
Sign in Start free trial

How to Check DKIM Records and Verify Email Signatures

How to Check DKIM Records and Verify Email Signatures

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to every email you send. The receiving server retrieves your public key from DNS and uses it to verify that the message came from your domain and was not modified during delivery. If the signature is valid, the email passes DKIM authentication.

Unlike SPF, which only checks whether the sending server is authorized, DKIM proves the message content itself is authentic. This makes it the strongest of the three email authentication mechanisms (SPF, DKIM, DMARC).

How DKIM works in practice

  1. Your mail server (or email service) generates a hash of the email headers and body
  2. It encrypts that hash with your domain's private key and attaches it as a DKIM-Signature header
  3. The receiving server reads the selector and domain from the signature header
  4. It retrieves the public key from DNS: {selector}._domainkey.yourdomain.com
  5. It decrypts the signature and compares the hash to the actual message content
  6. If they match, the email passes DKIM — the message is authentic and unaltered

How to check a DKIM record

Use the Cleanbox DKIM Checker to look up and validate a DKIM public key. You need two pieces of information:

  • Domain — The domain that signed the email (e.g., yourdomain.com)
  • Selector — An identifier that tells the receiver which key to look up (e.g., google, s1, default)

The tool queries {selector}._domainkey.{domain} and displays the public key, key type, and any configuration issues.

How to find the selector

The selector is not always obvious. Here is how to find it:

From an email header: Open any email sent from the domain, view the full headers, and look for the DKIM-Signature header. The s= value is the selector:

DKIM-Signature: v=1; a=rsa-sha256; d=yourdomain.com; s=google; ...

In this example, the selector is google.

Common selectors by provider:

Email serviceCommon selectors
Google Workspacegoogle
Microsoft 365selector1, selector2
Fastmailfm1, fm2, fm3
Zoho Mailzmail
Mailchimpk1
SendGrids1, s2
Amazon SESVaries (CNAME-based)
PostmarkVaries (CNAME-based)

What to check in the results

When the DKIM checker returns a result, verify:

  • Key exists — If no record is found, DKIM signing is not set up for that selector. Any email signed with it will fail verification
  • Key type — Most DKIM keys use RSA. The recommended minimum key length is 2048 bits. Keys of 1024 bits still work but are increasingly considered weak
  • Record format — The public key should be a valid base64-encoded string. Truncated or malformed keys cause silent DKIM failures

Common DKIM problems

Key not published in DNS

Your email service generates DKIM keys and signs messages, but you must publish the public key in your DNS. If you set up Google Workspace but never added the DKIM TXT record to your DNS, every email is signed with a key that receivers cannot verify. The fix: follow your email provider's DKIM setup guide and add the DNS record.

DNS record too long for a single TXT record

2048-bit DKIM keys exceed the 255-character limit of a single DNS TXT string. Most DNS providers handle this automatically by splitting the value into multiple strings within one TXT record. If your DKIM checker shows a truncated key, check whether your DNS provider requires you to split the value manually.

Key rotation not completed

When you rotate DKIM keys (which you should do periodically for security), you must publish the new public key in DNS before your mail server starts signing with the new private key. If you switch keys without updating DNS, all outgoing email fails DKIM until the DNS record is updated.

Multiple signing domains

If you use multiple email services (e.g., Google Workspace for employee email and SendGrid for transactional email), each service uses its own DKIM selector. This is correct — you can have multiple DKIM records as long as each uses a different selector. Use the DKIM checker to verify each one separately.

DKIM and DMARC alignment

For DMARC to pass, at least one of SPF or DKIM must both succeed and align with the visible “From” domain. DKIM alignment means the d= value in the DKIM signature matches the “From” domain.

This is why DKIM is often more important than SPF for DMARC: third-party services that send on your behalf can sign with your domain's DKIM key (achieving alignment), even though their sending IPs are not in your SPF record. For more on this, see DMARC alignment explained.

Complete your authentication setup

DKIM is one piece of the email authentication triad. For full protection:

For the full guide on how all three work together, see the complete guide to email authentication.

Ready to take control of your inbox?

Start protecting your email with Cleanbox — free plan available, no credit card required.

Get started free