Protect your domain from email spoofing with our Free DKIM Generator. Easily generate DKIM keys and create the DNS TXT records needed to authenticate your outgoing emails. Strengthen email security, verify message integrity, and improve email deliverability with a simple DKIM setup that helps protect your domain from phishing and unauthorized email use.
What DKIM Is and Why It Matters for Email Security
DomainKeys Identified Mail, or DKIM, is a core email authentication standard that helps receiving servers verify that a message was authorized by the owner of a sending domain. It works by adding a DKIM signature to outgoing emails. That signature is created with a private key, while the matching public key is published as a DKIM record in DNS.
When a receiving mail server gets the message, it performs a DKIM lookup, retrieves the public key from the sender’s DNS TXT record, and checks whether the DKIM signature is cryptographically valid. If the message was altered in transit or sent by an unauthorized system, the authentication check can fail.
DKIM matters because attackers frequently spoof a trusted domain name to send phishing emails, malware, invoice fraud, and impersonation messages. A proper DKIM setup helps protect your mail domain, improves trusted email delivery, and supports broader email authentication frameworks such as SPF and DMARC.
DKIM’s Role in Email Authentication
DKIM is not designed to work alone. It is one part of a layered email authentication strategy. SPF verifies whether a sending IP is allowed to send emails for a domain name. DKIM verifies message integrity using a DKIM key pair. DMARC then tells receivers what to do when SPF or DKIM authentication fails.
For organizations using Google Workspace, Microsoft 365, Mailchimp, or another email service provider, enabling DKIM is essential. Whether you rely on an ESP, a cloud provider, or a dedicated mail server, DKIM signing helps prove that outgoing emails are legitimate and authorized.
How a Free DKIM Generator Works

A free DKIM generator creates the DKIM key pair needed to configure DKIM for your domain. The DKIM key pair includes a private key and a public key. The private key stays with your mail server, email provider, or ESP, while the public key is placed in DNS as part of a DKIM record.
Most tools, including a DKIM Record Generator, EasyDMARC’s DKIM Generator, and other free DKIM generator platforms, ask for a domain name, selector, and key length to generate DKIM info. The selector is a label used to identify which public key should be used for verification. For example, a default selector might be default, google, mail, or selector1.
A DKIM generator typically outputs:
- A private key in PEM format
- A public key for DNS publication
- A DNS TXT record name
- A TXT record value containing the DKIM tag structure
- Instructions to publish in DNS
Public Key, Private Key, and Selector Explained
The private key is used by your mail server or email service provider to sign emails. It must be protected carefully because anyone with access to the private key could potentially create a valid DKIM signature for your domain name.
The public key is safe to publish in DNS because it is only used to verify the public signature. This public key is included inside the DNS TXT record as the p= value. A standard DKIM record also includes a version tag such as v=DKIM1, a key type such as k=rsa, and the public key data.
The selector connects the email header to the correct DKIM record. If your selector is mail and your domain name is example.com, the DNS TXT record name is usually:
mail._domainkey.example.com
That selector allows the receiving mail server to locate the right public key for DKIM authentication.
Choosing the Right Key Length
Key length directly affects security and compatibility. RSA 1024-bit keys are now considered weak for many environments. RSA 2048-bit is the common recommendation for most DKIM setup requirements, while RSA 4096-bit provides stronger protection but may exceed DNS provider TXT record limits if not formatted correctly.
Some newer systems support Ed25519, but RSA remains the most widely compatible algorithm for email authentication. When using a DKIM generator, choose a key length and key size supported by your email provider, DNS host, and receiving mail systems. A strong DKIM key pair with an appropriate key length makes DKIM signing more resilient against cryptographic attacks.
Step-by-Step Guide to Creating and Publishing a DKIM Record
Creating a DKIM record is straightforward, but accuracy matters. A small typo in the DNS TXT record, selector, or public key can cause email authentication failures.
1. Generate the DKIM Key Pair
Open a trusted DKIM generator, such as EasyDMARC’s DKIM Generator or another reputable DKIM Record Generator. Enter your domain name, choose a selector, and select the key length. For most organizations, RSA 2048-bit is a practical default.
The DKIM generator will create a DKIM key pair: a private key and a public key. Save the private key securely in PEM format if you manage a dedicated mail server. If you use Google Workspace, Microsoft 365, Mailchimp, or another ESP, the platform may generate and manage the private key for you.
Private Key Handling Best Practices
Never publish the private key in DNS, email, documentation, or public repositories. Only the public key belongs in the DNS TXT record. Strong key management reduces the risk of attackers abusing your domain name to send emails that appear legitimate.
2. Create the DNS TXT Record
Next, copy the DNS TXT record details from the DKIM generator. The host/name usually includes the selector and _domainkey, while the TXT record value includes DKIM tags such as:
v=DKIM1; k=rsa; p=PUBLIC_KEY_VALUE
The v=DKIM1 tag identifies the record as a DKIM record. The k=rsa tag defines the key type and algorithm. The p= tag contains the public key.
Log in to your DNS management console or admin panel. This may be in GoDaddy, Namecheap, Cloudflare, AWS Route 53, Google Cloud DNS, or Route 53 through your AWS account. Add a new DNS TXT record using the exact selector-based host name and record value provided by the DKIM generator.
3. Publish in DNS and Test DKIM
After you publish in DNS, allow time for DNS propagation. Then use a DKIM lookup tool, DKIM Record Checker, or record checker from providers such as EasyDMARC or PowerDMARC to test DKIM.
A DKIM Record Checker confirms whether the DNS TXT record is visible, whether the public key is correctly formatted, and whether the DKIM record is syntactically valid. You can also send a test message and inspect the headers to confirm that DKIM signing is active and the DKIM signature passes authentication.
Common DKIM Setup Mistakes and How to Avoid Them

Even experienced administrators can make errors when they configure DKIM. Many deliverability issues come from small DNS configuration mistakes rather than problems with the DKIM generator itself.
Incorrect Selector or Domain Name
The most common issue is using the wrong selector or domain name. If your email provider signs with selector1 but your DNS TXT record uses default, receiving servers will not find the correct public key. Always confirm the selector shown in your email provider’s admin panel and match it exactly in DNS.
This is especially important when multiple platforms send emails for the same domain name. For example, Google Workspace, Microsoft 365, and Mailchimp may each require a different selector and DKIM record.
Broken TXT Record Value
Another common mistake is damaging the TXT record value when copying the public key. Some DNS platforms split long values automatically, while others require manual quoting. Cloudflare, GoDaddy, Namecheap, AWS Route 53, and Google Cloud DNS each handle long DNS TXT record entries slightly differently.
If the record value includes extra spaces, missing semicolons, or an incomplete public key, the DKIM record may fail. A DKIM lookup tool can quickly identify formatting problems.
Weak or Outdated Key Length
Using an old RSA 1024-bit key length can weaken email authentication. For most organizations, RSA 2048-bit is a better baseline. Larger enterprises, including Fortune 100 companies with mature security programs, often include DKIM key rotation and strict key management as part of ongoing authentication governance.
Key rotation means replacing an old DKIM key pair with a new DKIM key pair on a planned schedule. This limits long-term exposure if a private key is compromised. Some providers also offer hosted DKIM, such as PowerDMARC’s Hosted DKIM, to simplify updates without repeated manual DNS changes.
Strengthening Domain Protection with SPF, DMARC, and Ongoing Monitoring
A DKIM record is powerful, but it is strongest when combined with SPF, DMARC, and continuous monitoring. SPF authorizes sending sources, DKIM proves message integrity with the public key and private key model, and DMARC applies domain-level policy enforcement.
For example, DMARC can instruct receivers to quarantine or reject messages that fail authentication. This prevents attackers from abusing your domain name even if they attempt to bypass one layer of protection. Vendors such as EasyDMARC and PowerDMARC, both commonly reviewed on platforms like G2, provide tools for monitoring authentication results, identifying unauthorized senders, and improving trusted email delivery.
Ongoing monitoring is important because your email ecosystem changes over time. Marketing platforms, CRM systems, cloud provider services, billing tools, and support platforms may all send emails on your behalf. Each email provider or ESP must be correctly authorized, and each DKIM setup must use the right selector, public key, DNS TXT record, and key length.
A mature approach includes:
- Regularly using a DKIM Record Checker or DKIM Lookup tool
- Reviewing SPF and DMARC reports
- Rotating each DKIM key pair periodically
- Protecting every private key
- Verifying DNS configuration after provider changes
- Checking that each DKIM signature remains cryptographically valid
By using a reliable free DKIM generator, publishing an accurate DKIM record, and maintaining strong email authentication controls, organizations can reduce spoofing risk and improve the credibility of every message they send.










