Guides

How to Set Up DKIM for Your Email

Turn on DKIM signing for your email, step by step: the key to publish in DNS, the right selector, a 2048-bit key and the known pitfalls.

DKIM adds a digital signature to every email you send. The receiving mail server fetches the public key from your domain's DNS, at an address like selector._domainkey.yourdomain.com, and checks two things: the message really comes from your domain, and it wasn't changed on the way.

It's also what keeps DMARC passing when an email is forwarded: forwarding often breaks SPF, rarely DKIM. Since 2024, Gmail requires SPF or DKIM from every sender, and both, plus DMARC, above 5,000 messages a day.

Three things to know first.

  • DKIM is turned on where your email is sent from, not just in DNS. Microsoft 365, Google Workspace or your newsletter tool generates the key; you publish it at your DNS provider, then turn signing on at the sender. A published key with signing turned off does nothing.
  • The selector name is set by the sender: google for Google Workspace, selector1 and selector2 for Microsoft 365. DNS can't list a domain's selectors, so a tool that doesn't know yours can't conclude it's missing.
  • Aim for a 2048-bit key. The standard requires at least 1024 bits and recommends 2048. Some DNS providers limit the length of a TXT field: the key must then be split into several quoted chunks, without losing a single character.

Most common pitfalls: the domain added twice to the name (google._domainkey.yourdomain.com.yourdomain.com), a key cut short when pasting, a CNAME entered as a TXT record, and signing left off at the sender.

Pick your email provider's guide below. For Google Workspace, turning on DKIM is covered step by step in the Google Workspace DMARC guide. To check your key, use our free DKIM checker.