How to Add DKIM in Cloudflare, Create & Setup Records Easily 2026
By Impran M N
DKIM lets receiving mail servers verify that your outgoing emails really came from your domain, and Cloudflare is where you'll publish that authentication record if your DNS is hosted there. This guide walks through pulling your DKIM public key from your email provider and correctly adding it as a TXT record in Cloudflare, including the one setting that trips people up most.
01Get your DKIM key from your email provider
Before touching Cloudflare, log into your email service and generate your DKIM public key along with the selector string it assigns you — you'll need both to build the record.
02Open your domain's DNS records in Cloudflare
Log into Cloudflare, select the domain, and go to the DNS management view where you'll add a new record.
03Add a new TXT record
Click Add Record and choose TXT as the type, since DKIM keys are published as text records rather than any other DNS type.
04Format the record name with your selector
Enter your selector name followed by `._domainkey` as the record name — this exact format is what mail servers look for when verifying your key.
05Paste the key value
Paste your key string starting with `v=DKIM1; k=rsa; p=` into the content field exactly as your email provider generated it.
06Turn the proxy off and save
Set the record to "DNS Only" instead of proxied — DKIM values must resolve directly or verification will fail — then save and check your status with a mail-testing tool.
Frequently asked questions
Why does my DKIM record fail verification in Cloudflare?
The most common cause is leaving the proxy toggled on (orange cloud). DKIM TXT records must be set to DNS Only so mail servers can read the raw value.
What goes in the record name field?
Your selector string followed by `._domainkey`, exactly as provided by your email service — not just the selector alone.
Can I have more than one DKIM record?
Yes, if you use multiple email services or selectors, each gets its own TXT record with a different selector prefix.
How do I confirm DKIM is working after saving?
Use a mail-testing tool to send a test email and check that the DKIM signature validates against the published record.
Watch the full walkthrough
The same steps, demonstrated on screen from start to finish.



