Defaults.Exposed

Defaults.Exposed › Setup › DKIM

How to set up DKIM on Cloudflare

Publish your mail provider's DKIM key in Cloudflare DNS so your emails carry a tamper-proof signature.

Why this matters to your business

DKIM (DomainKeys Identified Mail) adds an invisible digital signature to every email you send. The receiving mail provider uses a public key you’ve published in your DNS to confirm two things: the message really came from your domain, and nobody altered it on the way.

In plain terms: DKIM is a seal of authenticity on your email. It makes impersonation harder and improves the chance your genuine mail reaches the inbox rather than spam. Like the others, it’s free and it’s a one-time setup.

Important: DKIM has two halves

DKIM is the one record where it really matters who does what:

So: generate in the mail platform, publish in the DNS host.

First, confirm Cloudflare runs your DNS

A DKIM record only works if Cloudflare is answering DNS for your domain. Cloudflare’s DNS is only live when your domain’s nameservers (set at your registrar) point to the Cloudflare nameservers shown in your dashboard. Open your domain in Cloudflare and check the Overview page — it will confirm whether Cloudflare is active. If your nameservers point to another provider, add the DKIM record there instead; it won’t take effect at Cloudflare.

Get the key from your mail provider

In your mail provider’s admin area, look for the DKIM or email-authentication setting and generate/enable a key. It will give you two pieces of text:

Copy both exactly.

Step-by-step on Cloudflare

  1. Sign in to Cloudflare and select your domain.
  2. In the left-hand menu, go to your DNS settings (look for DNS / Records).
  3. Click Add record.
  4. Set Type to TXT for most DKIM keys. Use CNAME only if your provider specifically told you to — some providers, including Microsoft 365, use CNAME records that point back to their servers.
  5. In the Name field, enter only the selector part — for example google._domainkey or selector1._domainkey. Do not add your domain name on the end; Cloudflare appends it automatically.
  6. In the Content field, paste the long key value exactly as your provider gave it. (For a CNAME, paste the target host they gave you instead.)
  7. Leave TTL on Auto.
  8. Click Save.

Cloudflare quirks people get wrong

Verify it worked

After saving and allowing a little propagation time, run the free check on this site. It will confirm in plain language whether your DKIM record is published and readable.

Done? Check your domain free to confirm it worked — and see your full grade across all 34 checks.