Sign inStart for $1

DKIM record generator

DKIM lets a receiving server confirm that a message really came from your domain and was not changed on the way. It works with a pair of keys: the private key stays with the system that sends your mail, and the public key sits in your DNS. This page makes a fresh 2048-bit pair inside your browser, so the private key never leaves your device, and writes the DNS record for you.
Letters, digits, hyphens and underscores. A date in the name, such as s202610, makes rotation easy to track.

The private key is made inside this page and stays on your device. Keep it secret: anyone who has it can sign mail as your domain.

The key pair is made by your browser and stays on your device; this page never sends the key, the selector or the domain anywhere.

How it works

  1. The tool asks your browser's built-in WebCrypto to make an RSA key pair with a 2048-bit modulus, the public exponent 65537 and the RSASSA-PKCS1-v1_5 signature scheme with SHA-256, the combination DKIM uses.
  2. The public key is exported in the SPKI format and written as base64 on one line. That is the text that goes after p= in the record.
  3. The private key is exported in the PKCS8 format and wrapped as a PEM block with 64 character lines, which most sending platforms accept.
  4. The DNS host is your selector, then ._domainkey., then your domain. The TXT value is v=DKIM1; k=rsa; p= followed by the public key.
  5. A 2048-bit record is longer than the 255 characters that one DNS string can hold, so the tool also shows the value cut into quoted strings of 255 characters or fewer, which DNS providers that ask for split strings expect.

Limits

  • Some sending platforms make their own keys and give you only the DNS record to publish. If yours does, use the record it gives you and not a key from this page.
  • The private key is shown once. If you close the page without saving it, generate a new pair and publish a new record.
  • The key is a PKCS8 PEM block headed PRIVATE KEY. A few older systems want the PKCS1 form headed RSA PRIVATE KEY, and need a conversion step.
  • A few DNS providers do not accept TXT values longer than 255 characters in one string, or silently drop the quotes. Use the split version if yours complains.
  • Publishing the record does not turn signing on. The sending system must be set up with the private key and the same selector.

Related tools