Skip to content
ByWhoIs ByWhoIs
Real-Time · Instant Lookup

DKIM Key & Record Generator

Generate a DKIM key pair (RSA 2048, RSA 1024 or Ed25519) and the matching DNS TXT record. Keys are created with your browser's Web Crypto API — the private key never touches our servers.

Enter your domain and selector, then generate. Keys are created locally.
◆ Technical Reference & Quick Answer

What Is a DKIM Key Pair?

DKIM (DomainKeys Identified Mail) signs each outgoing email with a private key kept on your mail server. Receivers fetch the matching public key from a DNS TXT record at selector._domainkey.yourdomain.com and verify the signature, proving the message was sent by your domain and not altered in transit.

Key Types
RSA 2048 (recommended), RSA 1024, Ed25519
Output
DNS host, TXT value, 255-char split value, PKCS#8 private key
Security
Generated in-browser with Web Crypto; never transmitted
Verification
One-click check with the Email Auth Checker

DKIM, SPF and DMARC Work Together

SPF authorizes the servers that may send for your domain, DKIM proves each message was signed by your domain, and DMARC tells receivers what to do when both fail. Major mailbox providers now require all three for bulk senders. Publishing DKIM is usually the step that makes forwarded mail pass DMARC, because signatures survive forwarding while SPF does not.

DKIM Record Fields

DKIM Record Fields
Field Meaning Example
v=DKIM1 Record version Always DKIM1
k= Key algorithm rsa or ed25519
p= Base64 public key MIIBIjANBgkqh…
Selector Label that identifies the key default, s1, mail2026

How to Set Up DKIM

  1. 1 Generate keys

    Enter your domain and a selector, choose RSA 2048 and generate the key pair.

  2. 2 Publish the TXT record

    Create a TXT record at selector._domainkey.yourdomain.com with the generated value.

  3. 3 Install the private key

    Add the private key to your mail server or ESP signing settings, then verify with the Email Auth Checker.

Frequently Asked Questions

Is it safe to generate a DKIM private key online?

With this tool, yes: keys are generated by your own browser using the Web Crypto API and are never sent to ByWhoIs. You can disconnect from the internet after the page loads and it still works.

RSA 2048 or Ed25519?

Use RSA 2048 for maximum compatibility. Ed25519 keys are shorter and modern, but not every receiver verifies them yet, so publish them alongside an RSA selector.

My DNS provider rejects the long TXT value

Use the split value, which breaks the record into quoted 255-character strings that DNS joins automatically.

How often should DKIM keys be rotated?

Rotating every 6–12 months is good practice. Publish a new selector, switch signing to it, then remove the old record after a few days.