Octeth v6.0.7 Now Available! See What's New
Free Generator Tool

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.

Enter your domain without http:// or www

A unique identifier for your DKIM key (e.g., "default", "mail", "2024", or your mail server name)

Tip: 2048-bit keys offer the best balance of security and compatibility. Some DNS providers have limits that may require 1024-bit keys.

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

1

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.

2

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.

3

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.

4

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

1024 bit

Legacy key size. Use only if your DNS provider has character limits. Provides basic security but may become deprecated.

2048 bit Recommended

Industry standard. Offers excellent security and is supported by all major email providers and DNS services.

4096 bit

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.

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.