Publishing the private key by mistake
Only the public record (the v=DKIM1 value with p=) goes in DNS. The PEM private key belongs in your sending platform, never in a DNS record. Keep a secure backup of it.
Generate a 2048-bit RSA key pair entirely in your browser, then copy the DKIM TXT record to publish in DNS and the matching private key to install in your sending platform. Nothing is uploaded or stored, and the private key never leaves your device.
Generated a record? Confirm it resolves with the DKIM checker, then see where your mail lands with a free inbox placement test.
DKIM (DomainKeys Identified Mail) signs your outgoing messages with a private key so receivers can verify, using a public key you publish in DNS, that the mail really came from your domain and was not altered in transit. This generator creates a fresh 2048-bit RSA key pair with your browser's built-in Web Crypto, formats the public half as a DKIM TXT record (v=DKIM1; k=rsa; p=...) for DNS, and gives you the private half as a PEM file for your mail server or ESP. Because the keys are generated locally, the private key is never transmitted anywhere. You publish the record at selector._domainkey.yourdomain.com, where the selector is a short label you choose.
A short label you pick (for example unspam or 2026a) that names this key. You publish the record at selector._domainkey.yourdomain.com and configure your platform to sign with the same selector. Use a new selector when you rotate keys.
The base64 public key inside the TXT record. Receivers fetch it from DNS to verify your signature. It is safe to publish and cannot be used to sign mail.
The PEM block you install in your mail server or ESP. It signs your outgoing mail and must stay secret. Anyone who has it can sign mail as your domain, so store it securely and never put it in DNS.
The generator uses RSA at 2048 bits, the current recommendation. 1024-bit keys are widely treated as too weak, and a growing number of providers reject them.
Optional. While t=y is present, receivers treat the domain as testing and may ignore DKIM failures. Use it briefly during setup, then remove it once signing works.
Only the public record (the v=DKIM1 value with p=) goes in DNS. The PEM private key belongs in your sending platform, never in a DNS record. Keep a secure backup of it.
A single DNS TXT string is capped at 255 characters and a 2048-bit key is longer. Split the value into multiple quoted strings inside one TXT record; most DNS hosts do this automatically when you paste it.
The selector in DNS must match the selector your platform signs with. If they differ, receivers look up the wrong record and DKIM fails. Set both to the same label.
The DNS record alone does nothing. You also have to install the private key and turn on DKIM signing for this selector in your mail server or ESP.
Older setups still use 1024-bit keys, which are below today's recommendation. Generate a 2048-bit key with a fresh selector and retire the old one.