DKIM Record Generator
Construct and format valid DNS TXT DKIM records to verify outbound domain emails, prevent phishing attacks, and fulfill Google & Yahoo sender deliverability guidelines completely client-side.
* Configure this private key inside your outbound email server (cPanel, Postfix, Mailgun, etc.). It never leaves your browser.
[selector]._domainkey). * Use this split version if your DNS host enforces strict 255-character limits.
| Tag | Name | Required | Details & Common Settings |
|---|---|---|---|
| v= | Version | Yes | Declares the DKIM specification version. Must be set precisely to DKIM1 and positioned at the very start of the TXT string. |
| k= | Key Type | No | Identifies the signing key algorithm. Defaults to rsa which is universally supported. Newer specifications include ed25519. |
| p= | Public Key | Yes | The base64url-encoded public key block. Leaving this tag empty (i.e. p=) actively revokes that selector key. |
| g= | Granularity | No | Restricts which local addresses can use the selector. Default is * (all users are permitted). |
| h= | Hash Type | No | A colon-separated list of permitted cryptographic hash algorithms (e.g. sha256:sha1). Defaults to all. |
How DKIM Signatures Work Under the Hood
DomainKeys Identified Mail (DKIM) represents an essential cornerstone of email deliverability. By associating a domain name with a message using asymmetric public-key cryptography, it enables receiving mail transfer agents (MTAs) to confirm that the email genuinely originated from the claimed domain and has not been altered or intercepted in transit.
When an email is sent, the outbound server compiles a cryptographic hash of key headers (such as From, To, Subject, and Date) along with the message body. It then signs this hash using the domain's secure private key, adding the resulting signature inside the DKIM-Signature header. The public key, published in DNS as a TXT record, is retrieved by the recipient server to verify this signature, guaranteeing email integrity.
Fulfilling Modern Deliverability Mandates
In early 2024, Google and Yahoo implemented strict authentication mandates for bulk email senders (domains dispatching over 5,000 messages daily). Senders must configure three core protocols: SPF, DKIM, and DMARC.
Failing to configure valid DKIM keys causes domain emails to be flagged by spam filters, resulting in immediate delivery failures or placement in the recipient's spam folder. Implementing a 2048-bit DKIM record significantly improves domain reputation and ensures high deliverability rates.
Static Offline Crawlable DNS TXT Example
The code block below demonstrates how a fully assembled DKIM public record is formatted in your DNS registrar's zone sheet.
Selector: default._domainkey Record Type: TXT TTL: 3600 Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12345...
Handling DNS 255-Character Record Limits
Many legacy domain registrars enforce a strict character limit constraint of 255 characters on individual text strings in DNS TXT records. Because a secure 2048-bit RSA key is approximately 390 characters long, pasting it as a single block will result in validation errors.
To bypass this, our generator automatically provides a **concatenated split format**. By breaking the public key into multiple double-quoted segments separated by spaces, the DNS server combines them seamlessly on query, satisfying legacy system character constraints perfectly.
100% Client-Side Secure Key Generation
Generating cryptographic keys on remote servers presents severe security vulnerabilities, as the private key could be intercepted, logged, or stored by the hosting platform.
FlowStack Tools prioritizes absolute privacy. Our generator utilizes the browser's native **Web Cryptography API** to create 1024-bit and 2048-bit RSA keypairs completely locally on your device. The private key remains in local volatile memory and is never transmitted across the network, ensuring complete domain authentication safety.
Frequently Asked Questions
What is DKIM and how does it prevent domain email spoofing?
DKIM (DomainKeys Identified Mail) is an email authentication protocol that adds a digital signature to the headers of outbound email messages. The domain owner publishes a corresponding cryptographic public key as a DNS TXT record under a specific selector. When a receiving mail server gets an email, it retrieves the public key from the sender's DNS zone and uses it to verify the signature. If the signature matches the message contents, it mathematically guarantees that the email was genuinely authorized by the domain owner and was not altered or forged in transit.
What is a DKIM selector and how should I choose it?
A DKIM selector is a string used to identify and locate a specific DKIM public key in your domain's DNS records. It allows domain owners to publish multiple distinct public keys for different sending systems (such as marketing platforms, internal office suites, and transactional email providers) without them overriding one another. Standard selectors are often default words like `default`, `google`, `mail`, or `k1`. The selector is prepended to the DNS host name in the format `[selector]._domainkey.yourdomain.com`.
Why is a 2048-bit RSA key preferred over a 1024-bit key today?
A 2048-bit RSA key offers significantly greater cryptographic strength than a 1024-bit key, making it exponentially more resistant to brute-force factorization attacks. Leading security guidelines from Google, Yahoo, and security agencies recommend deploying 2048-bit keys for email signing. While some older DNS hosting platforms have historically struggled to support the long text strings required by 2048-bit keys, modern DNS providers support them seamlessly. You should only use 1024-bit keys if your domain registrar enforces strict character limit constraints.
How do I handle character limit constraints in DNS registrar entries?
Standard DNS TXT records have a character limit of 255 characters per string. Because a 2048-bit public key string is approximately 390 characters long, it will fail validation if entered as a single block in legacy systems. To bypass this, the DNS standard supports "string concatenation" where the value is broken into multiple double-quoted strings separated by spaces, e.g., `"v=DKIM1; ... p=Part1..." "Part2..."`. Our advanced compiler formats both the standard single-line and concatenated variants to guarantee seamless registration.
Can I generate my cryptographic private and public keys safely online?
Generating keys on traditional web servers presents high security risks, as the private key (which controls email signing authority) is transmitted over the network and could be cached or logged. To solve this, our DKIM Record Generator operates **100% locally client-side** using the browser's secure native Web Cryptography API (`window.crypto.subtle.generateKey`). Your private key is compiled directly in your device's local RAM sandbox and never exits your browser, guaranteeing absolute confidentiality.
Where do I add the compiled private key in my mail server?
Once you generate your keypair, copy the private key block (including the BEGIN and END wrappers) and paste it into your email server's configuration files or hosting administration dashboard. For example, in cPanel under "Email Deliverability", in Postfix using OpenDKIM config sheets, or directly within transactional providers like Mailgun, SendGrid, or Amazon SES. The private key must remain highly secured, as anyone with access to it can sign emails claiming to originate from your domain.
What are the main tags utilized inside a DNS DKIM TXT record?
A standard DKIM record value is a semicolon-separated string containing specific tag-value pairs. The primary tags are: `v=DKIM1` (Version, indicating the DKIM specification version; must be defined first), `k=rsa` (Key Type, declaring the cryptographic algorithm used; defaults to RSA), and `p=[base64_string]` (Public Key, holding the base64url-encoded public key). Other optional tags include `g` (granularity), `s` (service types), and `t` (flags). The public key `p` tag is required, and leaving it empty effectively revokes the key.
Related Domain & Email Authentication Utilities
SPF Generator
Formulate secure DNS SPF records to authorize specific mail servers and IP ranges.
DMARC Generator
Establish robust domain DMARC policies to manage mail failures and monitor spoofing reports.
DNS CAA Generator
Create DNS CAA records to authorize specific Certificate Authorities to issue SSL certificates.
DNS Lookup
Check current global DNS records including TXT, MX, A, AAAA, and CNAME logs.
DNS MX Lookup
Retrieve and verify domain Mail Exchanger (MX) routing priorities instantly.
Robots.txt Generator
Build search crawl rules for domain index directories quickly.