- 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
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
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
Publish the public key
Create a TXT record at selector._domainkey.yourdomain.com and paste the generated value.
- 3
Turn on signing
Point your mail server at the private key and selector, then restart it.
- 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.
| Platform | Who makes the key | What you publish | Where to set it up |
|---|---|---|---|
| Google Workspace | One TXT record (default selector google) | Admin console: Apps, Google Workspace, Gmail, Authenticate email | |
| Microsoft 365 / Office 365 | Microsoft | Two CNAME records (selector1 and selector2) | Microsoft Defender portal: Email authentication settings, DKIM |
| cPanel hosting | Your host | One TXT record, often added for you | cPanel: Email Deliverability |
| Postfix, Exim or your own SMTP server | You | One TXT record from this generator | OpenDKIM or your server's signing settings |
| Apps and sending tools (CRMs, cold email tools) | Usually the tool | TXT or CNAME records they list | The 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
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
Confirm the value
The result should start with v=DKIM1 and contain the full p= public key with no missing characters.
- 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
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 see | Likely cause | Fix |
|---|---|---|
| No DKIM record found | Wrong host name or selector | Publish 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 signing | Sign as the last step, or stop the tool that rewrites messages |
| Key too long for DNS | Panel limit of 255 characters per string | Split the value into quoted strings, or use a 1024-bit key as a last resort |
| DKIM passes but DMARC fails | Signing domain does not match the From domain | Sign with your own domain, not the sending tool's default domain |
| Record has extra quotes or spaces | Copied with formatting | Paste 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.
Keys are generated for you to copy into your own server. Store the private key only on the mail server that signs your email, and generate a new pair if it is ever shared by mistake.
Use 2048-bit unless your DNS provider cannot hold a record that long. Longer keys are harder to break and are the current recommendation from major mailbox providers.
You can, but Google must sign with its own private key, so use the key from the Google Admin console. This generator is best for servers and apps that sign their own mail.
Any short label made of letters, numbers and hyphens. Many teams use a date, like s2026, so they can publish a new selector when they rotate keys without breaking the old one.
If your email is hosted by Google Workspace, Microsoft 365 or your web host, generate the key in their admin panel and publish the record they give you. If you run your own mail server, use the DKIM generator above to create the key pair and TXT record, then add the private key to your server.
Microsoft 365 creates the keys for you. In the Microsoft Defender portal, open the DKIM settings for your domain, publish the two CNAME records it shows (selector1 and selector2), then switch signing on.
You do not need one. Microsoft 365 creates and rotates the DKIM keys itself, so there is nothing to generate. You publish the two CNAME records (selector1 and selector2) shown in the Microsoft Defender portal, then turn on signing. Use a DKIM generator only for mail servers you run yourself.
Yes. The DKIM generator, DKIM record checker, SPF and DMARC generators are free to use with no signup.
It is a TXT record published at selector._domainkey.yourdomain.com that holds your public key, in the form v=DKIM1; k=rsa; p=followed by the key. Receiving servers use it to check the signature on your email.
The key itself is published as a TXT record. Some providers, such as Microsoft 365, ask you to add CNAME records that point to TXT records they host and rotate for you.
Run dig TXT selector._domainkey.yourdomain.com +short, replacing selector with your own. If nothing comes back, the record is missing or the selector is wrong.
Check that signing is switched on, the selector matches, and the record was pasted without extra quotes or line breaks. Then run the DKIM checker to see the exact error.
Further reading
- RFC 6376: DomainKeys Identified Mail The DKIM standard that defines signatures, selectors and key tags.
- Google email sender guidelines Gmail requirements for authentication, spam rates and unsubscribe links.
- Yahoo sender best practices What Yahoo Mail expects from bulk and cold email senders.
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.