Skip to content
New: Go-to-market lead lists, 5X cheaper with 10X more data than other tools
  • Generate DKIM keys at 1024 or 2048 bits
  • Platform-specific setup guide
  • Ready-to-paste TXT record

DKIM Record Generator

Create a valid DKIM record to add it to your DNS configuration and complete the second step of email authentication.

Domain: leadcanal.com

Select your email service provider for specific setup instructions

Fill in your domain and select your email provider to generate your DKIM record.

This free DKIM generator creates a 2048-bit private and public key pair and the exact DKIM TXT record to publish in DNS. Pick your platform, selector and key length, and get the record in seconds.

Do you need to generate DKIM keys yourself?

Often you do not. Google Workspace, Microsoft 365 and most email platforms generate DKIM keys for you, and you only publish the record they give you. Use their key when one exists, because only they hold the private half.

A DKIM key generator is for servers you run yourself: Postfix, Exim, a private SMTP relay or an app that signs its own mail. In that case you need both keys, and this tool gives you both.

Choosing settings in the DKIM key generator

Domain

The domain in your From address. Use the exact domain or subdomain that sends.

Platform

Sets the setup guide you receive, so the steps match your server or service.

Selector

Any short label, like mail or s2026. Date-based names make key rotation easy.

Key length

2048-bit is the current standard. Use 1024 only if your DNS host cannot store long records.

How to use the DKIM generator and put the record live

  1. 1

    Generate the key pair

    Fill in the form above. Copy the private key straight into your mail server and keep it out of email threads and shared docs.

  2. 2

    Publish the public key

    Create a TXT record at selector._domainkey.yourdomain.com and paste the generated value.

  3. 3

    Turn on signing

    Point your mail server at the private key and selector, then restart it.

  4. 4

    Test it

    Send a message to a Gmail account, open the original and look for dkim=pass. Then run the DKIM checker.

What the DKIM generator gives you

The public record is short in structure but long in characters. Some DNS panels split it into several quoted strings automatically. That is normal, and receivers join them back together.

  • Host: selector._domainkey
  • Type: TXT
  • Value starts with v=DKIM1
  • Rotate keys every 6 to 12 months

Where to create a DKIM record on each email platform

Most hosted platforms generate the key pair for you. Use their key when they offer one, and use this DKIM generator as your DKIM TXT record generator for servers you run yourself, such as Postfix, Exim, hMailServer or MailEnable.

PlatformWho makes the keyWhat you publishWhere to set it up
Google WorkspaceGoogleOne TXT record (default selector google)Admin console: Apps, Google Workspace, Gmail, Authenticate email
Microsoft 365 / Office 365MicrosoftTwo CNAME records (selector1 and selector2)Microsoft Defender portal: Email authentication settings, DKIM
cPanel hostingYour hostOne TXT record, often added for youcPanel: Email Deliverability
Postfix, Exim or your own SMTP serverYouOne TXT record from this generatorOpenDKIM or your server's signing settings
Apps and sending tools (CRMs, cold email tools)Usually the toolTXT or CNAME records they listThe tool's domain or sender settings page

How to generate a DKIM key on the command line

If you prefer to create the keys on your own server, OpenSSL or OpenDKIM does the same job as this DKIM key generator. The private key stays on the server that signs your mail; only the public key goes into DNS.

After generating, publish the public key as a TXT record at selector._domainkey.yourdomain.com, with the value v=DKIM1; k=rsa; p= followed by the key on one line.

  • Use 2048-bit keys unless your DNS host cannot store long records
  • Keep the private key readable only by the mail service
  • Pick a dated selector, such as s2026, to make rotation easy

How to check your DKIM record is live

DNS changes usually show up within minutes, but some providers take a few hours.

  1. 1

    Look up the record

    Run the DKIM record checker with your domain and selector, or on the command line run: dig TXT s2026._domainkey.example.com +short

  2. 2

    Confirm the value

    The result should start with v=DKIM1 and contain the full p= public key with no missing characters.

  3. 3

    Send a real test

    Email a Gmail address, open the message, choose Show original and check that DKIM says PASS for your domain.

  4. 4

    Check alignment for DMARC

    The d= domain in the signature should match your From domain, or DMARC will not count the pass.

Common DKIM record errors and how to fix them

What you seeLikely causeFix
No DKIM record foundWrong host name or selectorPublish at selector._domainkey and check the selector matches your server
dkim=fail (body hash did not verify)A gateway or footer changed the message after signingSign as the last step, or stop the tool that rewrites messages
Key too long for DNSPanel limit of 255 characters per stringSplit the value into quoted strings, or use a 1024-bit key as a last resort
DKIM passes but DMARC failsSigning domain does not match the From domainSign with your own domain, not the sending tool's default domain
Record has extra quotes or spacesCopied with formattingPaste the value as plain text on one line

Do you need DKIM for cold email and bulk sending?

Yes. Gmail and Yahoo require every sender to authenticate with SPF or DKIM, and bulk senders must have SPF, DKIM and a DMARC record. Without DKIM, more of your mail lands in spam or is rejected outright.

For cold email, set DKIM on every sending domain and mailbox, not just your main domain. Then add SPF and DMARC with the SPF and DMARC generators, and run a full domain health check before you start sending.

Frequently asked questions

Still unsure? Ask us and we will answer the same day.

Ask a question

Further reading

Running your own mail server for outreach?

We set up private email servers and mailboxes with DKIM, SPF, DMARC and warm-up configured and tested.