DKIM Record
Generator
Generate secure DKIM key pairs and DNS records for your domain in seconds. Authenticate your outgoing emails and protect your sender reputation with cryptographic signing.
DNS TXT Record
How to Configure DKIM
- 1 Copy the Private Key and configure it on your mail server (e.g., in Postfix, Sendmail, or your email platform)
- 2 Log in to your DNS provider and navigate to DNS settings
- 3 Add a new TXT record with the name shown above (e.g.,
selector._domainkey) - 4 Paste the DNS record value as the TXT record content
- 5 Wait for DNS propagation (up to 48 hours) and verify with our DKIM checker
What is DKIM and Why Does It Matter?
Understanding DKIM (DomainKeys Identified Mail)
DKIM is an email authentication protocol that uses cryptographic signatures to verify that an email message was sent by an authorized mail server and hasn't been tampered with during transit. When you send an email, your mail server signs the message with a private key. The recipient's mail server then uses the public key (published in your DNS) to verify the signature.
Benefits of Implementing DKIM
Improved Email Deliverability
Major email providers like Gmail, Microsoft, and Yahoo prioritize DKIM-signed emails, leading to better inbox placement rates.
Protection Against Email Spoofing
DKIM prevents attackers from forging emails that appear to come from your domain, protecting your brand and recipients.
Message Integrity Verification
Recipients can verify that the email content hasn't been modified during transit, ensuring message authenticity.
DMARC Compliance
DKIM is a required component for DMARC implementation, which provides comprehensive email authentication and reporting.
How to Create and Publish a DKIM Record
Choose a selector
Pick a short name such as s1 or a date like 2026nov. The selector lets you publish several DKIM keys on one domain and replace a key without downtime.
Generate the key pair
Create a 2048-bit key above. The private key signs your outgoing mail. The public key goes into DNS so receivers can check the signature.
Install the private key
Add the private key and selector to the server or platform that signs your mail, such as OpenDKIM with Postfix, PowerMTA or your email service.
Publish the public key
Add a TXT record named selector._domainkey for your domain and paste the generated value. Then send a test message and check the DKIM result in its headers.
Common DKIM Record Mistakes to Avoid
Wrong record name
The record must sit at selector._domainkey.yourdomain. Some DNS panels add the domain automatically, so entering the full name creates selector._domainkey.yourdomain.yourdomain.
Broken key value
A missing character, an extra space or a line break pasted into the p= value makes the key unreadable and every signature fails. Copy the value in one piece.
Signing with another domain
If your platform signs with its own domain instead of yours, DKIM can pass while DMARC still fails. Sign with the domain in your From address.
DKIM Key Length Comparison
Legacy key size. Use only if your DNS provider has character limits. Provides basic security but may become deprecated.
Industry standard. Offers excellent security and is supported by all major email providers and DNS services.
Maximum security. May require splitting the DNS record into multiple parts. Use for high-security requirements.
Frequently asked questions
What does a DKIM record do?
A DKIM record publishes the public key that receiving servers use to check the digital signature on your email. If the signature matches, the receiver knows the message was signed by a server holding your private key and that the signed parts were not changed in transit.
What is a DKIM selector?
A selector is a label that tells receivers which DKIM key to look up. It appears in the s= tag of the signature, and the public key is published at selector._domainkey.yourdomain. Different services or key versions can use different selectors on the same domain.
Which DKIM key length should I use?
Use 2048 bits unless your DNS provider cannot store a record that long. 1024-bit keys are weaker and should be replaced. 4096-bit keys are longer than some DNS providers and receivers handle, so check support before using one.
Is the private key sent to Octeth?
No. This generator creates the key pair in your browser with the Web Crypto API and does not send it to a server. Keep the private key secret and store it only on the system that signs your mail.
Why does my DKIM check fail after publishing the record?
The usual causes are a record at the wrong name, a value that was cut or split incorrectly when pasted, a selector on the server that does not match the DNS record, or a DNS change that has not reached the receiver yet. Look up the record with a DKIM checker to confirm it is visible and complete.
How often should I rotate DKIM keys?
Rotate keys on a regular schedule and whenever a private key may have been exposed. Publish the new key under a new selector, switch signing to it, and remove the old record once mail signed with the old key is no longer in transit.
Related Email Authentication Tools
SPF & DKIM Checker
Verify your DNS records
DKIM Validator
Validate DKIM configuration
SPF Generator
Create SPF records
SPF Validator
Validate SPF records
DMARC Generator
Generate DMARC policies
All Tools
Browse all free tools
Sender domain authentication for ESP customers
Guide: SPF, DKIM and DMARC setup when you run an email service provider
Running Your Own Email Infrastructure
Guides for choosing software and servers when you send from infrastructure you control.
Self-Hosted Email Marketing Software
Eleven self-hosted platforms compared by license, price, sending setup and fit.
VPS for Email Marketing
Port 25 policies, reverse DNS and extra IPs across 14 VPS providers.
Open Source Email Marketing Software
listmonk, Mautic, Keila, phpList and more, with license and last release.
Bulk Email Software
SaaS, self-hosted and desktop senders priced at 400,000 emails a month.
Mailchimp Alternatives
Real prices at 10,000 and 100,000 contacts, including self-hosted options.
Need Enterprise Email Infrastructure?
Octeth provides self-hosted email marketing software with built-in DKIM signing. Own your infrastructure and maintain full control over your email authentication.