How to Add a DKIM Record

DKIM setup is a copy-precision exercise: your sending service hands you a selector and a public key, you publish them as a TXT record at selector._domainkey, you verify. Here is the whole procedure with the failure points marked.

DKIM record fields

FieldExample valueMeaning
Host / Names1._domainkeySelector plus the fixed _domainkey label
TypeTXTDKIM keys publish as TXT (some hosts use CNAME)
Valuev=DKIM1; k=rsa; p=MIIB...The public key, verbatim from your provider
TTL3600Standard caching

Step by step

  1. Get the values from your sender. Google Workspace, Microsoft 365, and every ESP generate the key pair and show you: the selector (host name fragment), and the TXT value starting v=DKIM1; k=rsa; p=....
  2. Create the TXT record in your DNS host. Host/name: selector._domainkey (your provider may show the full selector._domainkey.yourdomain.com). Value: the key string verbatim. TTL 3600.
  3. Do not touch the key. No added spaces, no smart quotes, no truncation. If the value exceeds 255 characters your DNS host either splits it automatically or expects multiple quoted strings.
  4. Activate signing on the sender side. Publishing DNS does nothing until the service starts signing; in Google Workspace you must click "Start authentication", in M365 run Enable-DkimSigning.
  5. Verify end to end. The DKIM checker confirms the key resolves and reports its strength; then send yourself a message and check the DKIM-Signature header plus the receiver's Authentication-Results.

Common failure points

  • Host written as _domainkey alone, dropping the selector: wrong name, no resolution.
  • Key pasted with the quotes some panels add automatically, doubling them.
  • DNS published but sender-side signing never enabled: everything checks out except actual mail.
  • Multiple senders sharing one selector: they must each use their own.

Frequently asked questions

Where do I get my DKIM key?+

From your sending service: Gmail, Microsoft 365, and ESPs generate the key pair and show you the public value to publish. The private key never leaves their system in hosted setups.

Can I add DKIM without my ESP?+

Only if you run your own mail server and generate the key pair yourself. Hosted ESPs own the private key and publish the selector for you to add.

How do I test the record after adding it?+

Send a message and read the DKIM result in its headers, or run the selector through our DKIM record checker before sending anything.

Related

Last verified: 2026-10-28