DKIM Generator

Free DKIM Record Generator

Configure your selector, paste your public key, and generate a properly formatted DKIM TXT record ready to add to your domain's DNS.

Configure Your DKIM Record

Enter a selector name. Your email provider will tell you which selector to use.

Flags

Adds an informational note to the record (n= field). Not used for validation.

Generated DKIM Record

DNS Record Name
selector._domainkey.yourdomain.com
Record Type
TXT
TXT Record Value
v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_HERE

How to Add This Record to Your DNS

  1. 1Log in to your domain registrar or DNS provider (e.g., Cloudflare, Namecheap, GoDaddy, Route 53).
  2. 2Navigate to DNS management for your domain.
  3. 3Add a new TXT record with the name selector._domainkey.yourdomain.com.
  4. 4Paste the generated TXT record value above into the value field.
  5. 5Save and wait for DNS propagation (usually 5 minutes to 48 hours).

What is a DKIM Record?

DKIM (DomainKeys Identified Mail) is an email authentication protocol that uses public-key cryptography to verify that an email was sent by an authorized server and has not been modified in transit. It works by adding a digital signature to the email header, which the receiving mail server validates against a public key published in DNS.

The DKIM record itself is a DNS TXT record that contains the public key. When a receiving server gets an email with a DKIM signature, it queries DNS for the public key using the selector and domain from the signature header, then uses that key to verify the signature. A valid signature confirms both authenticity and integrity.

Since February 2024, Google and Yahoo require DKIM authentication for all bulk senders. Without a valid DKIM record, your emails are more likely to be flagged as spam or rejected outright. DKIM also contributes to DMARC alignment, which is required for full email authentication compliance.

DKIM Record Fields Explained

v=DKIM1

Version

Identifies the record as a DKIM key record. This tag is required and must be the first tag in the record. The only valid value is DKIM1.

k=rsa

Key Type

Specifies the cryptographic algorithm used. rsa is the standard and universally supported. ed25519 is newer and produces shorter keys but has limited receiver support.

p=...

Public Key

The base64-encoded public key data. This is the key that receiving servers use to verify DKIM signatures. An empty p= value means the key has been revoked.

t=y / t=s

Flags

t=y indicates testing mode — failures should not cause rejection. t=s enforces strict alignment, requiring the signing domain to exactly match the From header domain (no subdomains).

How to Get Your DKIM Public Key

Your DKIM public key is generated by your email service provider. You do not create this key yourself — you copy it from your provider's admin panel and publish it in your DNS. Here is where to find it in common providers:

Provider-Specific Setup

Google Workspace

  1. Go to Admin Console → Apps → Google Workspace → Gmail
  2. Click "Authenticate email"
  3. Select your domain and click "Generate new record"
  4. Copy the TXT record value (selector is usually google)

Microsoft 365

  1. Go to Microsoft Defender portal → Email authentication
  2. Select DKIM and choose your domain
  3. Click "Create DKIM keys"
  4. Publish both CNAME records (selectors selector1 and selector2)

Smartlead

  1. Go to Settings → Email Accounts
  2. Select your email account and click "DNS Settings"
  3. Copy the DKIM TXT record provided
  4. Add it to your domain DNS with the specified selector

SendGrid

  1. Go to Settings → Sender Authentication
  2. Click "Authenticate Your Domain"
  3. Follow the wizard to generate DNS records
  4. SendGrid uses CNAME records (selectors s1 and s2)

Frequently Asked Questions

What is a DKIM record?
A DKIM (DomainKeys Identified Mail) record is a DNS TXT record that publishes the public key used to verify DKIM signatures on outgoing emails. When an email is sent, the sending server signs it with a private key. The receiving server looks up the corresponding public key in DNS to verify the signature, confirming the email is authentic and unaltered.
What is a DKIM selector?
A DKIM selector is a label that identifies which DKIM key pair to use. It allows a domain to have multiple DKIM keys for different email services. The selector appears in the DNS record name as selector._domainkey.yourdomain.com. Common selectors include "google" for Google Workspace, "s1" or "s2" for Microsoft 365, and "default" for many other providers.
Where do I find my DKIM public key?
Your DKIM public key is provided by your email service. In Google Workspace, go to Admin > Apps > Google Workspace > Gmail > Authenticate email. In Microsoft 365, go to the Defender portal under Email authentication > DKIM. For third-party senders like SendGrid or Smartlead, check their DNS authentication or domain verification settings.
Should I enable DKIM testing mode?
Testing mode (t=y) tells receiving servers to treat DKIM signature failures as non-fatal. Use it when you first set up DKIM to verify everything works before enforcing. Once you confirm emails are signing correctly, remove the testing flag so receiving servers fully enforce DKIM verification.
What is the difference between RSA and Ed25519 DKIM keys?
RSA is the standard DKIM key type supported by virtually all mail servers. Ed25519 is a newer algorithm that produces shorter signatures and is faster, but has limited support among receiving servers. Most domains should use RSA (2048-bit) unless you have confirmed that your recipients' mail servers support Ed25519.

Related Tools

Related Reading

Monitor DKIM Across All Your Domains

This free tool generates DKIM records on demand. Superkabe monitors DKIM, SPF, and DMARC across all your sending domains automatically — every 24 hours — and alerts you before misconfigurations cause deliverability failures.

Start free trial