---
title: "DKIM Checker: DKIM Record Lookup and Key Test"
description: "Look up a DKIM record by selector, or scan common selectors. The checker reads the key type and size, and flags revoked keys, testing mode and 1024-bit keys."
canonical_url: "https://smtp.dev/tools/dkim-lookup/"
---

> Index of every page on this site: [llms.txt](https://smtp.dev/llms.txt)

## What a DKIM record is

DKIM ([RFC 6376](https://www.rfc-editor.org/rfc/rfc6376)) lets the sending server sign each message with a private key. The receiver reads the `DKIM-Signature` header, takes the selector (`s=`) and domain (`d=`), fetches the public key from DNS, and verifies the signature.

```txt
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=s2026; ...
```

The verifier fetches the TXT record at `s2026._domainkey.example.com`:

```txt
s2026._domainkey.example.com.  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQAB"
```

A domain can have any number of selectors, one per sending service or key generation, which is how you rotate keys without downtime.

## How to read the result

<table>
<thead>
  <tr>
    <th>
      Tag
    </th>
    
    <th>
      What it means
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        v
      </code>
    </td>
    
    <td>
      Version. Optional, but if present it must be <code>
        DKIM1
      </code>
      
       and come first.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        k
      </code>
    </td>
    
    <td>
      Key type: <code>
        rsa
      </code>
      
       (default) or <code>
        ed25519
      </code>
      
       (<a href="https://www.rfc-editor.org/rfc/rfc8463" rel="nofollow">
        RFC 8463
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        p
      </code>
    </td>
    
    <td>
      Public key in base64. Empty means revoked.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        t
      </code>
    </td>
    
    <td>
      Flags: <code>
        y
      </code>
      
       means testing, <code>
        s
      </code>
      
       means the <code>
        i=
      </code>
      
       domain must equal <code>
        d=
      </code>
      
       exactly.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        h
      </code>
    </td>
    
    <td>
      Allowed hash algorithms. If present it needs to include <code>
        sha256
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        s
      </code>
    </td>
    
    <td>
      Service type: <code>
        *
      </code>
      
       or <code>
        email
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

The checker decodes `p=` to read the RSA modulus, so the reported key size comes from the key itself, not from a guess based on its length.

## Common failures and how to fix them

**No record at the selector.** Either the selector is wrong or the record was never published. Check the `s=` value in a real signature. Some providers (Microsoft 365, many email services) ask you to publish a CNAME instead of a TXT record; the checker follows CNAMEs and tells you where the key really lives.

```txt
selector1._domainkey.example.com.  CNAME  selector1-example-com._domainkey.example.onmicrosoft.com.
```

**Key truncated or mangled.** Web DNS panels sometimes cut long values, or keep the quotes you pasted. If `p=` does not decode to a valid key, compare it character by character with what your provider gave you. A 2048-bit key is about 400 base64 characters. It has to be split into strings of up to 255 characters, which are joined without spaces:

```txt
s2026._domainkey  TXT  ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
                         "...rest of the key...IDAQAB" )
```

**1024-bit key.** Generate a 2048-bit key under a new selector, publish it, switch signing, and remove the old record after a few days, once messages in flight have been verified.

**t=y left on.** Testing mode lets verifiers ignore failures. It is meant for initial setup only.

**h=sha1.** RFC 8301 retired SHA-1 for DKIM. Remove `h=` (the default allows sha256) or set `h=sha256`.

**Empty p= on a live selector.** Someone revoked the key, or the provider rotated it and your mail server still signs with the old one. Republish the current key or point signing at the active selector.

## DKIM and DMARC

For DMARC, a DKIM pass only counts when the signature's `d=` domain aligns with the From domain. A message signed only by your email provider (`d=esp-mail.net`) passes DKIM but not DMARC. Set up a custom DKIM domain with your provider so it signs as `d=example.com`, then confirm it by sending a message and reading `Authentication-Results` (look for `dkim=pass header.d=example.com`).

## Sitemap

See the full [sitemap](https://smtp.dev/sitemap.md) for all pages.
