Skip to main content

Create DKIM DNS Records for Email Authentication Generate DKIM DNS TXT records for email signing.

DKIM Record Generator illustration
🔐

DKIM Record Generator

Generate DKIM DNS TXT records for email signing.

1

Enter selector and domain

Type your domain name and choose a selector (e.g., default, mail). The selector identifies which key signs your emails.

2

Paste your public key

Copy the public key from your email provider (Gmail, SendGrid, etc.) and paste it into the key field.

3

Generate and copy the record

Click Generate to create the TXT record. Copy the output and add it to your DNS as a TXT record at selector._domainkey.yourdomain.com.

Loading tool...

What Is DKIM Record Generator?

A DKIM Record Generator is a tool that creates DomainKeys Identified Mail (DKIM) records by combining the selector, domain name, key type, and public key to generate a DKIM DNS record. Email administrators use it to create DKIM records for their domains, solving the specific problem of email spoofing by allowing recipients to verify the authenticity of incoming emails. The tool generates a dkim record in the format "selector._domainkey.domain IN TXT v=DKIM1; k=keyType; p=publicKey", which is then published as a DNS TXT record.

It supports both RSA and Ed25519 key types, giving administrators flexibility when creating their email DKIM records. The tool's interface allows users to input the selector, domain name, choose between RSA or Ed25519 for the key type, and paste their public key into a textarea. This makes it easy to create dkim records without manual string formatting.

What sets this tool apart is its ability to automatically generate the DKIM record based on user input and copy it to the clipboard with one click, simplifying the process of publishing the record as a DNS TXT entry for email verification purposes, thus securing domainkeys and preventing unauthorized emails from being sent on behalf of the domain. The generated output includes all necessary parameters, including version, key type, and public key, making it ready to use in dkim dns configuration.

Why Use DKIM Record Generator?

  • Correct formatting
  • RSA/Ed25519
  • Selector config
  • Instant copy

Common Use Cases

Email authentication

Set up DKIM for your domain so recipients can verify that emails came from you.

Deliverability

Improve inbox placement rates. Many providers require DKIM for better deliverability.

Provider setup

Configure DKIM for Gmail, Outlook, SendGrid, Mailchimp, and other email services.

Migration

Update or regenerate DKIM records when switching email providers or rotating keys.

Technical Guide

The tool works under the hood by using React state management to store user input values such as selector, domain name, key type, and public key. When the generate button is clicked, it triggers a useCallback function that removes unnecessary characters from the public key using regular expressions, replacing strings like "-----[^-]+-----" with an empty string and removing whitespace characters. The output DKIM record is then constructed by concatenating the selector, domain name, and formatted public key into a string in the format "selector._domainkey.domain IN TXT v=DKIM1; k=keyType; p=publicKey". This string is set as the output state value.

The tool uses TypeScript for type checking and utilizes React hooks like useState to manage component state. It also relies on browser APIs, specifically the clipboard API, through a utility function called copyToClipboard to handle copying the generated DKIM record to the user's clipboard when the copy button is clicked. The copied status is tracked using another state variable, which triggers a timeout to reset the status after 2 seconds. When generating the DKIM record, it supports both RSA and Ed25519 key types by including the chosen type in the output string.

The React component renders an interface with input fields for selector, domain name, and public key, as well as buttons for selecting the key type and generating the DKIM record. The generated output is displayed in a textarea with a copy button next to it, allowing users to easily publish their DKIM records as DNS TXT entries. This process involves using JavaScript's JSON.stringify function to properly format the DKIM parameters into a string that can be used directly in DNS configuration files or online management interfaces for email verification purposes.

Tips & Best Practices

  • 1
    Get the public key from your email provider's admin panel or DNS settings.
  • 2
    Use the selector name your provider specifies (often default, mail, or selector1).
  • 3
    Verify the record with: dig TXT selector._domainkey.yourdomain.com
  • 4
    Rotate keys by adding a new selector and updating DNS before removing the old one.

Related Tools

Frequently Asked Questions

Q Is the DKIM generator free?
Yes. The tool is free and runs entirely in your browser. No signup or uploads required.
Q Where do I get my DKIM public key?
From your email provider. Check your provider's admin panel, DNS settings, or documentation for the DKIM public key.
Q What is a DKIM selector?
A selector identifies which key is used for signing. It appears in the DNS hostname (e.g., default._domainkey.example.com) and in the DKIM-Signature header.
Q Can I have multiple DKIM records?
Yes. Use different selectors for different keys or services. Each selector gets its own DNS record.
Q Can I use this on mobile?
Yes. The tool works in any modern mobile browser.

About This Tool

DKIM Record Generator is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.