Skip to main content
Deliverability toolRuns in your browserFree · No signup

DKIM Record Generator

Create an RSA key pair for DKIM signing entirely in your browser, publish the public key as a TXT record, and keep the private key for your mail server. Also checks the DKIM record behind any selector on any domain.

Generate a key pair

Keys are created by your browser with WebCrypto. Nothing is uploaded.

The d= domain in your signatures. Usually the From domain of the sending inbox.

Published at cb1._domainkey. Date-based selectors like s202609 make rotation obvious.

2048-bit is required by current receiver guidance. 1024-bit only if your DNS host cannot store long TXT strings.

Takes under a second. Each click makes a fresh key.

Check an existing DKIM record

Looks up selector._domainkey.domain over DNS-over-HTTPS.

Uses the domain above. Looks up google._domainkey.yourdomain.com

Common selectors

DKIM records

Generate a key or check a selector

You will get the DNS TXT record to publish, the private key for your mail server, or a parsed view of what is already live.

Nothing leaves your browserNo account or email requiredUnlimited use
How it works

How to use the DKIM Generator

  1. 01

    Generate the key pair

    Enter the domain, pick a selector and key size, and click generate. WebCrypto creates the keys on your device in under a second.

  2. 02

    Publish the public key

    Add the TXT record at selector._domainkey on your domain. Use the split version if your DNS host limits strings to 255 characters.

  3. 03

    Install the private key and verify

    Download the PEM, configure your mail server or provider to sign with it, send a test message, then check the selector with the lookup tool.

How DKIM signing works

DKIM (DomainKeys Identified Mail) lets a receiver verify that a message was sent by someone holding your domain's private key and that it was not altered in transit. The sending server hashes the body, hashes a chosen set of headers, signs the result with the private key, and adds a DKIM-Signature header that includes the signing domain (d=), the selector (s=), the signed header list (h=), the body hash (bh=) and the signature itself (b=). The receiver fetches the public key from selector._domainkey.domain as a TXT record, recomputes the hashes, and checks the signature.

Because the signature travels with the message, DKIM survives forwarding, mailing lists that do not rewrite the body, and any hop that SPF cannot see. That makes it the more robust of the two authentication methods and the one most likely to carry DMARC alignment for cold email. The d= domain must align with the From header domain for DMARC to pass on DKIM, so sign with the domain your inboxes actually send from, not a shared provider domain.

The DNS record itself is small: v=DKIM1 for the version, k=rsa for the key type, and p= followed by the base64-encoded public key. Optional tags include t=y for testing mode, which tells receivers to ignore failures and should be removed once verified, and h= to restrict hash algorithms. An empty p= tag means the key has been revoked.

Key length, selectors and rotation

RFC 8301 requires verifiers to support keys up to 2048 bits and signers to use at least 1024. In practice 2048-bit is the standard today, and several receivers score 1024-bit keys as weak. The only reason to choose 1024 is a DNS host that cannot store a TXT value longer than 255 characters, and even then the correct fix is to split the value into multiple strings, which the generator provides, rather than weaken the key. A 2048-bit public key is about 392 base64 characters; a 1024-bit key is about 216.

A selector is just a label that lets a domain publish several keys at once. Providers use fixed ones, google for Google Workspace, selector1 and selector2 for Microsoft 365, k1 for Mailchimp, s1 and s2 for SendGrid, zoho or zmail for Zoho. For your own keys, date-based selectors such as s202609 make rotation self-documenting.

  • Rotate keys every 6 to 12 months, or immediately if a private key may have leaked.
  • Publish the new selector first, switch signing to it, then leave the old record in DNS for at least a week so in-flight mail still verifies.
  • Revoke a retired selector by publishing an empty p= rather than deleting the record, so receivers get an explicit answer.
  • Use a different selector per sending system so you can revoke one without touching the others.

Where the private key goes, and where it must never go

If your inboxes are hosted on Google Workspace or Microsoft 365, you do not need to generate a key at all. Those providers create and hold the private key themselves; you only copy the public record they give you into DNS. The same applies to most SMTP relay services. This generator is for the cases where you control signing: a Postfix or Exim server with OpenDKIM, Amazon SES with bring-your-own DKIM, a Mailgun or similar service that accepts a custom key, or an appliance that signs outbound mail.

The private key here is produced by your browser's WebCrypto API and exported in PKCS#8 PEM format, which is what OpenDKIM, SES and most SMTP software expect. It is never transmitted; reloading the page destroys it. Store it with the same care as a password: on the signing server with restrictive file permissions, in a secrets manager, or in a password vault. It must never be pasted into DNS, committed to a repository, or sent over chat. If a key is exposed, generate a new pair under a new selector, switch signing, and revoke the old selector.

DKIM for cold email secondary domains

Gmail and Yahoo require every sender to pass SPF or DKIM, and bulk senders to pass both plus DMARC alignment. Since most cold email volume runs on Google Workspace or Microsoft 365 inboxes spread across secondary domains, the practical step for each domain is to turn on DKIM in the provider console, publish the record it gives you, and verify it with the checker above. A domain sending without DKIM is far more likely to land in spam on day one, and a domain whose DKIM record has been mistyped, a stray space or a missing quote in the p= value is the classic case, is effectively unsigned.

Verify after every DNS change and after any provider migration. The checker parses the live record, estimates the key size from the base64 length, and flags testing mode, revoked keys and corrupted values. The selector scan tries the ten most common provider selectors so you can find a record without knowing the selector in advance. If none match, open a message you sent to yourself, view the headers, and read the s= tag in the DKIM-Signature line. ColdBox runs this check on every connected inbox and alerts you if a record disappears or fails to verify, so a broken key never quietly costs a campaign.

FAQ

DKIM Generator questions

Straight answers, no fluff. Still stuck? Our deliverability team replies within a couple of hours.

Ask a human

Yes. The tool calls the WebCrypto API built into your browser to generate an RSA key pair on your device. Nothing is sent to a server, the page has no backend for this feature, and reloading the page discards the key. If your browser does not expose WebCrypto, usually because the page is not served over HTTPS, the tool says so instead of falling back to a server.

No. Both providers generate and hold the private key for you and give you a public record to publish in DNS. Google provides a TXT record on the google selector; Microsoft provides CNAME records for selector1 and selector2. Use this generator only when you control the signing server, for example OpenDKIM, Amazon SES with your own key, or a relay that accepts custom keys.

2048-bit. Verifiers are required to support it, receivers increasingly treat 1024-bit keys as weak, and the only cost is a longer DNS value. If your DNS host rejects a value over 255 characters, enter the record as multiple quoted strings using the split version the tool provides, rather than dropping to a shorter key.

A label that identifies which public key a signature uses, so a domain can publish several keys at once. The signature carries it in the s= tag and receivers look up selector._domainkey.yourdomain.com. Providers use fixed selectors such as google, selector1, k1 or s1. For your own keys, a date-based selector like s202609 makes rotation easy to track.

A single TXT string is capped at 255 characters and a 2048-bit key produces a value around 410 characters. The record is still valid; it just needs to be stored as two or more strings that receivers join back together. Copy the split version, which wraps the value in quoted 255-character chunks, and enter it as your host expects. Many hosts split automatically.

Enter the domain and selector in the checker, or use the scan to try the ten most common provider selectors at once. If none match, send yourself a message from the domain, view the raw headers, and read the s= value from the DKIM-Signature line. The checker then shows the parsed tags and an estimate of the key size.

Every 6 to 12 months for routine hygiene, and immediately if a key may have been exposed. Publish the new key under a new selector, switch your signer to it, and keep the old record live for at least a week so messages still in transit verify. Then revoke the old selector by publishing an empty p= value.

Start Free Today

Every inbox authenticated, every record monitored.

ColdBox verifies SPF, DKIM and DMARC on each connected inbox, warms domains safely and alerts you the moment a record breaks. Free 7-day trial, no credit card.

Free trialNo credit cardSetup in 5 minutes