Most DKIM setup problems come from one confusion. Your mail provider makes the key pair, and your DNS only publishes the public half. This page explains how to create a DKIM record without mixing up those two jobs.
Key facts:
- A DKIM record is a TXT record published at
selector._domainkey.domain(RFC 6376). - The
p=tag holds the base64 public key, andk=names the key type, which defaults to RSA (RFC 6376). - RFC 8301 sets 1024 bits as the minimum for RSA signing keys.
- Per the BillionVerify DKIM Generator, the tool does not create keys. It builds the hostname and a template with the placeholder
YOUR_PUBLIC_KEY_HERE. - Per the BillionVerify DKIM Generator, the tool lists the TXT record type and a TTL of 3600 or your DNS provider’s default.
How to create a DKIM record step by step
1. Get the key from your provider
Open the DKIM or sender-authentication page of the service that sends your mail. The tool’s own note points to Google Workspace under Admin, Gmail, Authenticate email, and to Microsoft 365 under Exchange Admin, DKIM. It also names Mailchimp under Account, Domains and SendGrid under Settings, Sender Authentication.
The provider shows you a selector and a public key. Copy both.
2. Build the hostname and value
Enter the selector and your domain. The selector field starts as mail, and a blank domain falls back to example.com, so fill in the real one. The tool returns two items:
- the hostname, in the form
selector._domainkey.yourdomain.com - a value shaped like
v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_HERE
3. Replace the placeholder
Paste the provider’s public key in place of YOUR_PUBLIC_KEY_HERE. Keep the key on one line, with no spaces and no line breaks.
4. Publish it as TXT
Create a TXT record with that hostname and value. Many DNS panels append your domain to the host on their own. If yours does, enter only the part before your domain.
A 2048-bit key is longer than a single DNS string allows, which is 255 bytes (RFC 1035). Most panels split it for you. After saving, read the record back to confirm nothing was trimmed.
Some providers skip this process. They give you CNAME records that point to keys they host. Publish exactly what they give you, and you do not need the TXT template.
How to test the DKIM record
Wait for DNS to update, then look up the same selector and domain in a DKIM checker. You want to see your key, its type and a sensible bit length. Then send a message to a mailbox you control and read the DKIM line in its headers.
Rotate keys by publishing a new selector first and switching the sender to it. Retire the old selector later, so mail in transit still verifies.
What to do after DKIM passes
DKIM helps only if the mail goes to real inboxes. A typo or a dead address still bounces, whatever your signing looks like. To find out, run the address through the BillionVerify checker. You get 20 free full checks per IP every 24 hours, no sign-up.
Then add a DMARC policy that uses your signing. For a bounce that DNS cannot explain, prove a mailbox can accept mail with one SMTP check.