DKIM record generator
Pick the service that sends your email and get the DKIM record to add to your DNS. Run your own mail server? Make the key pair here, in your browser.
We add it to the host names in your record. It stays on this page.
- Who makes the key
- Google makes the key. The selector is google unless you chose another prefix. If your DNS host can't take a 2048-bit key, pick 1024 there.
- Where to find it
- Admin console, Apps, Google Workspace, Gmail, Authenticate email. Pick the domain, then Generate new record with a 2048-bit key.
- The last step
- Once the record is published, go back to the same screen and click Start authentication. DNS can take up to 48 hours.
- Who makes the key
- Microsoft makes the keys. The ending differs by tenant: domains added since May 2025 point at dkim.mail.microsoft, older ones at onmicrosoft.com. Copy both values from the portal rather than typing them.
- Where to find it
- Microsoft Defender portal, Email & collaboration, Policies & rules, Threat policies, Email authentication settings, DKIM tab. Pick the domain to see both values.
- The last step
- After both CNAMEs are published, switch the domain's DKIM toggle to Enabled.
- Who makes the key
- SendWP holds the key. If your DNS is on Cloudflare, leave the proxy off for this record.
- Where to find it
- SendWP dashboard, your site, Deliverability, the DKIM Record card.
- The last step
- Click Recheck DNS (and Validate DKIM if it shows). The card turns to Configured.
- Who makes the key
- Mailgun makes the keys. With Automatic Sender Security it asks for these two CNAMEs and rotates the key for you. Without it, it shows one TXT record instead: copy that one.
- Where to find it
- Mailgun, your sending domain, Domain Verification & DNS.
- The last step
- Click Verify DNS settings.
- Who makes the key
- SendGrid makes the keys. The ids in the values are your account's own.
- Where to find it
- SendGrid, Settings, Sender Authentication, Authenticate your domain.
- The last step
- Add every record it lists (a third CNAME covers SPF), then click Verify. It can take up to 48 hours.
- Who makes the key
- Easy DKIM makes a 2048-bit key and three random tokens per domain and Region. Copy the values from the console: some Regions use a different ending.
- Where to find it
- SES console, Configuration, Identities, your domain, Authentication tab, Publish DNS records.
- The last step
- Wait for the identity to show Verified. It can take up to 72 hours.
- Who makes the key
- Postmark makes the key and a dated selector, like 20230601pm.
- Where to find it
- Postmark, Sender Signatures, DNS Settings next to your domain, the DKIM section.
- The last step
- Click Verify on the same page. DNS can take up to 24 hours.
- Who makes the key
- Mailchimp holds the keys. Verify the domain by email first. Use the host names it shows if they differ from these.
- Where to find it
- Mailchimp, Account & billing, Domains, Start authentication next to your verified domain, then manually authenticate.
- The last step
- Click Next in Mailchimp. The domain shows Authenticated, usually within 48 hours.
- Who makes the key
- Zoho makes the key. You name the selector; zoho is a common choice.
- Where to find it
- Zoho Mail Admin Console, Domains, your domain, Email Configuration, DKIM, Add selector. Pick 2048 bits.
- The last step
- Click Verify, then enable DKIM and make the selector the default.
Who makes the key
You do. This page makes the 2048-bit key pair in your browser.
The name of this key. mail is fine, or use the year, like s2026.
Keep this key secret. It never leaves your browser. It goes on your mail server, for example as OpenDKIM's KeyFile. If you lose it, make a new pair.
Your DKIM record
We never change your DNS. Add the record where your DNS is managed.
Google Workspace: TXT record
Host name
google._domainkey
Value
v=DKIM1; k=rsa; p=<the key Google shows>
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Microsoft 365: 2 CNAME records
Host name, record 1
selector1._domainkey
Value
selector1-<your-domain-with-dashes>._domainkey.<tenant>…
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 2
selector2._domainkey
Value
selector2-<your-domain-with-dashes>._domainkey.<tenant>…
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
SendWP: CNAME record
Host name
sendwp._domainkey
Value
dkim.sendwp.com
Mailgun: 2 CNAME records
Host name, record 1
pdk1._domainkey
Value
pdk1._domainkey.<id>.dkim1.mailgun.com
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 2
pdk2._domainkey
Value
pdk2._domainkey.<id>.dkim1.mailgun.com
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
SendGrid: 2 CNAME records
Host name, record 1
s1._domainkey
Value
s1.domainkey.u<id>.wl<id>.sendgrid.net
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 2
s2._domainkey
Value
s2.domainkey.u<id>.wl<id>.sendgrid.net
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Amazon SES: 3 CNAME records
Host name, record 1
<token1>._domainkey
Value
<token1>.dkim.amazonses.com
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 2
<token2>._domainkey
Value
<token2>.dkim.amazonses.com
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 3
<token3>._domainkey
Value
<token3>.dkim.amazonses.com
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Postmark: TXT record
Host name
<date>pm._domainkey
Value
v=DKIM1; k=rsa; p=<the key Postmark shows>
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Mailchimp: 2 CNAME records
Host name, record 1
k2._domainkey
Value
The CNAME 1 value Mailchimp shows
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Host name, record 2
k3._domainkey
Value
The CNAME 2 value Mailchimp shows
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
Zoho Mail: TXT record
Host name
zoho._domainkey
Value
v=DKIM1; k=rsa; p=<the key Zoho shows>
This shows the shape. Copy the real value from the screen on the left, because it is different for each account.
My own server: TXT record
Host name
mail._domainkey
Make your key pair on the left and the value appears here.
Value
Split for DNS hosts with a 255-character limit
A 2048-bit key is longer than one DNS string. If your host rejects the value above, paste it as quoted strings like these.
Rather make the key with openssl?
Run these two commands on your server. The first makes the private key, the second prints the public key.
openssl genrsa -out dkim.private.pem 2048
openssl rsa -in dkim.private.pem -pubout -outform der | openssl base64 -A
The record value is v=DKIM1; k=rsa; p= followed by that output.
This browser can't make keys on this page. Use a current Chrome, Edge, Firefox or Safari, or the openssl commands above.
What goes in a DKIM record
The selector is the name of one key. It is the first part of the host name: the selector mail puts the key at mail._domainkey.yourdomain.com. Each message says which selector signed it.
TXT or CNAME. A TXT record holds the public key itself. A CNAME points at a key your provider hosts and rotates, so you paste it once. Use the type your provider asks for.
Key length. Use 2048 bits. RFC 8301 says at least 1024, and says it should be 2048. A 2048-bit key is longer than 255 characters, so some DNS hosts want it split into quoted strings. Most join it for you.
Paste it, then check that it worked.
Wait for DNS to update, then run your domain and selector through the DKIM checker to confirm receivers can read the key. DKIM is one of three records: the SPF record generator and the DMARC record generator make the other two.
Monitoring is the step after that. It rechecks your records every day and emails you when a change breaks one.
Questions
What is a DKIM selector?
A selector is the name of one DKIM key. It is the first part of the host name, so a key with the selector mail sits at mail._domainkey.yourdomain.com, and each signed message names it in the s= tag. Each sender usually has its own selector, which lets you run several and swap keys without a gap.
Should my DKIM record be a TXT or a CNAME?
Use what your provider asks for. A TXT record holds the public key itself. A CNAME points at a key the provider hosts, so it can change the key for you without you touching DNS again. Microsoft 365, SendWP, SendGrid, Amazon SES and Mailchimp use CNAMEs; Google Workspace, Zoho and Postmark give you a TXT record.
What DKIM key length should I use?
2048 bits. The DKIM standard (RFC 8301) says keys must be at least 1024 bits and should be 2048, and receivers ignore signatures from shorter keys. A 2048-bit key is longer than 255 characters, so some DNS hosts want it split into two quoted strings. Most join it for you.
Do I need to make my own DKIM key?
Only if you run your own mail server. Google Workspace, Microsoft 365, SendWP and the other services here make the key and show you the record, so you only paste it. If your server signs its own mail, make a key pair with the generator above and put the private key on the server.
Is it safe to make a DKIM key on a web page?
Here, yes: the key pair is made by your browser's built-in Web Crypto and never leaves your device. We don't send it, store it or log it. If you would rather make it yourself, the openssl commands in the generator give you the same thing.
How do I check my DKIM record works?
Wait for DNS to update, then enter your domain and selector in the free DKIM checker. It reads the record and tests the key type and length. To see a real message pass, send yourself an email and paste its headers into the email header analyzer.