Back to Tools

DKIM Record Generator

Generate a valid DKIM DNS record for your domain. Choose your key type (RSA or Ed25519), set a selector, paste your public key, and get a ready-to-use TXT record with key generation commands.

DKIM Record Generator

Generate a valid DKIM DNS record for email authentication

Identifies which DKIM key to use (e.g., "default", "google", "s1")

Keys larger than 1024 bits may exceed the 255-character TXT record limit. Your DNS provider may split this automatically.

Paste the public key from your key pair. The header/footer and whitespace will be stripped automatically.

default._domainkey.example.com
v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_HERE

Run these commands to generate an RSA-2048 key pair:

openssl genrsa -out dkim_private.pem 2048
openssl rsa -in dkim_private.pem -pubout -out dkim_public.pem
1024-bitBasic

Security: Basic

Compatibility: Universal

2048-bitRecommended

Security: Strong

Compatibility: Most providers

4096-bitMaximum

Security: Maximum

Compatibility: May need splitting

How to set up DKIM

  1. Generate a public/private key pair using the commands above
  2. Add the TXT record to your DNS with the name shown above
  3. Configure your mail server to sign outgoing emails with the private key
  4. Verify with a DKIM checker
  5. Allow up to 48 hours for DNS propagation

About this tool

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to your outgoing emails, proving they haven't been tampered with in transit. This generator creates the DNS TXT record you need to publish your DKIM public key. Pair it with SPF and DMARC for complete email authentication. After adding the record, verify it with our DKIM checker.

Frequently Asked Questions