How to use the DKIM generator
- Enter your domain and a selector. A date-based selector such as
s2026makes rotation obvious. - Pick a key type. RSA 2048 is right for almost everyone.
- Generate. Publish the TXT record at
<selector>._domainkey.<domain>. - Install the private key on the signing server and keep it out of version control.
- Send a test message and check that
Authentication-Resultsshowsdkim=pass header.d=yourdomainandheader.s=with your selector.
What the record looks like
s2026._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
The p= value is the public key in SubjectPublicKeyInfo form, base64 encoded. For Ed25519 it is the raw 32-byte key, as RFC 8463 specifies.
A 2048-bit key does not fit in a single 255-character TXT string. Most DNS panels split it for you. If yours does not, or you edit zone files directly, use the split version the generator shows. The strings are joined without spaces.
Using the key with OpenDKIM
# Paste the private key the generator shows into the key file
sudo mkdir -p /etc/opendkim/keys/example.com
sudo nano /etc/opendkim/keys/example.com/s2026.private
sudo chown opendkim:opendkim /etc/opendkim/keys/example.com/s2026.private
sudo chmod 600 /etc/opendkim/keys/example.com/s2026.private
# /etc/opendkim/KeyTable
s2026._domainkey.example.com example.com:s2026:/etc/opendkim/keys/example.com/s2026.private
# /etc/opendkim/SigningTable
*@example.com s2026._domainkey.example.com
The generator outputs PKCS#8 PEM (BEGIN PRIVATE KEY), which OpenDKIM, Rspamd and most libraries such as Nodemailer accept.
Security notes
Keys are generated with the browser's WebCrypto API and never leave the page. Even so, a key that has been displayed on screen and copied around is less private than one generated on the signing server with opendkim-genkey or openssl. Use this generator for prototypes, test domains and servers where that trade-off is fine.