Generate real DKIM RSA key pairs instantly. Get your DNS TXT record, public key, and private key — free, secure, no account needed. Powered by PHP OpenSSL on your own server.
default, google, s1, mailgun — alphanumeric, hyphens allowed.
default._domainkey
DKIM is the authentication foundation — but a valid signature alone won't guarantee inbox placement. Warm up your inboxes, build real sender reputation automatically, and hit the primary inbox on every cold email campaign.
DKIM — short for DomainKeys Identified Mail — is an email authentication standard that lets domain owners cryptographically sign outgoing messages. The signature is attached to every email as a special header (DKIM-Signature) and verified by the receiving mail server using a public key published in the domain's DNS.
When a mail server receives an email, it looks up the sender's public key in DNS, recomputes the hash of the message headers and body, and compares it to the signature. If they match, DKIM passes — confirming the message was sent by an authorised server and was not altered in transit.
DKIM is one of the three core email authentication standards alongside SPF and DMARC. Together they form the backbone of modern email deliverability. Without DKIM, major providers like Gmail, Outlook, and Yahoo are more likely to route your messages to spam — especially for cold email and high-volume sending.
DKIM uses asymmetric (public/private key) cryptography. Here is the full flow from sending to verification:
DKIM-Signature header.DKIM-Signature header intact.DKIM-Signature header and queries DNS for the public key at [selector]._domainkey.[domain].From: header, closing the display-name spoofing gap that SPF alone cannot address.Unlike SPF, DKIM signatures survive email forwarding — the cryptographic signature remains valid even when the message passes through a forwarding server, because it is computed over the message content, not the connecting IP address.
Generating a DKIM key pair takes under two minutes. No technical background required — the generator handles all the cryptography using PHP OpenSSL on your WordPress server.
example.com) without any prefix like "www" or "mail".default, google, s1). The selector is part of the DNS host name.DKIM=pass.A DKIM selector is a short label that identifies which DKIM public key to look up in DNS. It is included in the DKIM-Signature header of every signed email as the s= tag (e.g. s=default).
The selector forms part of the DNS lookup path: [selector]._domainkey.[domain]. For example, if your domain is example.com and your selector is default, the public key is published at default._domainkey.example.com.
defaultdefault._domainkeygooglegoogle._domainkeys1s1._domainkeymxmx._domainkeyBecause selectors are independent, a single domain can publish multiple DKIM keys simultaneously — one per sending service. This avoids key conflicts and lets you rotate keys for individual services without affecting others.
Selector naming tips: Keep selectors short and descriptive. Use only letters, numbers, hyphens, and dots. Avoid spaces or underscores. Common conventions include default, s1, s2, google, mailgun, or a date like 202501 for rotation tracking.
DKIM uses asymmetric RSA cryptography. Two mathematically related keys are generated together — what one key encrypts, only the other can decrypt.
Private key security: Never commit your private key to git, paste it into a public Slack channel, or store it unencrypted. Use your hosting provider's secrets manager, environment variables, or a dedicated vault tool. If you suspect exposure, generate a new key pair immediately and update your DNS and mail server configuration.
Key rotation: Rotate your DKIM private key at least once per year, or immediately after any suspected compromise. Use a new selector for each rotation (e.g. s1 → s2) so you can publish the new key before removing the old one, minimising any delivery gap.
Once you have generated your key pair, you need to publish the public key in your domain's DNS as a TXT record. Here is a step-by-step guide.
Common DNS providers include Cloudflare, GoDaddy, Namecheap, AWS Route 53, Google Domains, and your domain registrar. Log in and navigate to the DNS management section for your domain.
[selector]._domainkey — for example default._domainkey. Some providers require the full hostname including your domain (default._domainkey.example.com); others handle the domain suffix automatically.v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ...DNS changes typically propagate within 5 minutes to 48 hours. Cloudflare and AWS Route 53 usually propagate in under 5 minutes. Legacy registrars may take up to 48 hours. You can check propagation status using MXToolbox DKIM Lookup.
Upload the private key to your mail sending software or ESP. The exact process varies by provider — see the ESP-specific recommendations shown after generation.
Send a test email to a Gmail address, open it, and click the three-dot menu → Show original. Look for DKIM: PASS in the authentication results. Alternatively use Google Admin Toolbox to verify your DNS record directly.
default._domainkey not default._domainkey.example.com.Below are examples of valid DKIM DNS records and the corresponding DKIM-Signature headers you would see in a signed email.
TXTdefault._domainkeyv=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...When your mail server signs an outgoing message, it adds a header like this:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=default; h=from:to:subject:date:message-id; bh=abc123...; b=XYZ456...
The key tags are: d= (signing domain), s= (selector), a= (algorithm — always rsa-sha256), h= (signed headers), and b= (the actual signature).
Google Workspace can generate and manage its own DKIM keys, or you can supply a custom key pair. Here are both approaches:
google and 2048-bit key size.google._domainkey.yourdomain.com.Note: Google requires DKIM authentication for all Google Workspace accounts sending bulk email after Google and Yahoo's February 2024 bulk sender requirements. 2048-bit keys are mandatory for new setups.
Cold email deliverability is a constant battle. DKIM is non-negotiable — but it's only one piece of the puzzle. Here is everything you need to know about DKIM in the context of cold outreach:
mail.yourdomain.com) for cold outreach to protect your primary domain's reputation.The key size determines the cryptographic strength of your DKIM signature. Here is a direct comparison:
When to use 1024-bit: Only if your DNS provider has a TXT record length limit that cannot accommodate a 2048-bit key. Some older DNS providers cap TXT records at 255 characters per string — although RFC 4408 allows multiple strings in a TXT record, not all providers handle this correctly.
DNS length workaround for 2048-bit keys: RFC 6376 allows the DKIM public key value to be split across multiple quoted strings in a single TXT record. Most modern DNS providers handle this transparently. If yours doesn't, contact your provider or switch to a provider that supports long TXT records (Cloudflare handles this with no issues).
DKIM-Signature header. A selector mismatch causes DKIM to fail at verification.Subject or From. If those headers are included in the DKIM signature hash, any modification will break the signature. Use c=relaxed/relaxed canonicalisation to tolerate minor whitespace normalisation.SPF, DKIM, and DMARC are three separate but complementary email authentication standards. Here is how they differ and how they work together:
The right deployment order: Start with SPF → add DKIM → then add DMARC in monitoring mode (p=none) → review aggregate reports → tighten to p=quarantine → then enforce p=reject. Deploying DMARC before SPF and DKIM are fully verified will cause legitimate mail to be rejected.
This means the signature verification failed. Common causes: the public key in DNS does not match the private key used to sign; the DNS TXT record was truncated during copy-paste; or a mail relay modified a signed header in transit.
No DKIM signature was found in the message. Your mail server is not signing outgoing mail. Check that your ESP's DKIM signing is enabled and that the correct private key has been uploaded.
Either DNS has not propagated yet (wait up to 48 hours) or the host name was entered incorrectly. Verify the host is exactly [selector]._domainkey without any extra characters or the wrong domain suffix.
2048-bit public keys are long. If your DNS provider truncates TXT values at 255 characters, the DKIM record will be invalid. Switch to Cloudflare or AWS Route 53, which correctly handle long TXT records. Alternatively, use 1024-bit as a temporary workaround.
DMARC requires alignment — the DKIM signing domain (d= tag) must match or be a subdomain of the visible From: domain. If your ESP signs with their own domain rather than yours, DKIM alignment fails under DMARC. Enable custom domain signing in your ESP settings.
DKIM (DomainKeys Identified Mail) is an email authentication method that allows the sending domain to attach a cryptographic signature to outgoing messages. The receiving server verifies the signature using a public key published in DNS, confirming the message was not tampered with and originated from an authorised server.
A DKIM selector is a short alphanumeric label (e.g. default, google, s1) used to identify which public key to look up in DNS. It forms part of the DNS lookup path: [selector]._domainkey.[domain]. Multiple selectors allow different sending services to each have their own DKIM key pair under the same domain.
Yes. 2048-bit keys provide significantly stronger cryptographic security and are the current industry standard. Google requires 2048-bit DKIM for new setups. Use 1024-bit only if your DNS provider cannot accommodate the longer record value.
Propagation typically takes between 15 minutes and 48 hours. Modern DNS providers like Cloudflare and AWS Route 53 usually propagate in under 5 minutes. Older registrars may take longer. Verify your record is live using MXToolbox DKIM Lookup.
Yes — unlike SPF, there is no limit to the number of DKIM selectors a domain can have. Each selector is a separate DNS record at a unique host name ([selector]._domainkey.[domain]). This lets you have separate keys for Google Workspace, Mailgun, SendGrid, and your own SMTP server simultaneously.
DKIM is a baseline deliverability requirement for cold outreach. Gmail and Yahoo require DKIM for bulk senders. Without it, messages are more likely to hit spam or be rejected. DKIM also survives forwarding — meaning your authentication signal remains intact even when prospects forward your email internally.
No. This generator uses PHP OpenSSL to generate a fresh key pair on-demand for each request. The private key is returned directly to your browser over HTTPS and is never written to the WordPress database, to disk, or to any log file. You are solely responsible for storing and securing the private key.
No. SPF and DKIM are complementary. SPF validates the sending IP. DKIM validates the message integrity and signing domain. DMARC ties both together. Best practice is to deploy all three: SPF + DKIM + DMARC.
Send a test email to a Gmail address, open it, click the three-dot menu → Show original, and look for DKIM: PASS in the Authentication-Results header. You can also use MXToolbox DKIM Lookup to verify the DNS record directly.
At minimum once per year, or immediately after any suspected key exposure. When rotating, use a new selector so you can publish the new key before retiring the old one. Keep the old DNS record live for at least 48 hours after switching your mail server to the new key to allow in-flight messages to verify correctly.