Adding a TXT record in Cloudflare takes about 2 minutes end-to-end.
Prerequisites
- Cloudflare account with your domain added as a zone
- Cloudflare’s nameservers assigned to your domain (verify with the DNS query tool)
Step 1 — Navigate to DNS Records
- Log into Cloudflare dashboard
- Select your domain from the site list
- Left sidebar → DNS → Records
Step 2 — Click Add Record
Blue Add record button at the top.
Step 3 — Fill in the Fields
- Type — TXT
- Name — depends on the record purpose:
- SPF →
@(root domain) - DMARC →
_dmarc - DKIM →
{selector}._domainkey(e.g.,google._domainkey) - Google Site Verification →
@ - Microsoft 365 Verification →
@
- SPF →
- Content — the TXT value, e.g.,
v=spf1 include:_spf.google.com ~all - TTL — Auto (Cloudflare’s default) — usually fine
Step 4 — Save
Cloudflare propagates the change to its global anycast network within seconds.
Step 5 — Verify
Wait 30-60 seconds. Verify with the DNS query tool — enter your domain and the record name. Expected: the TXT value you just published.
For SPF: use the SPF lookup tool. For DMARC: the DMARC lookup tool. For DKIM: the DKIM lookup tool.
Long Records (DKIM)
DKIM public keys often exceed 255 characters. Cloudflare handles the string-splitting automatically — paste the whole value in one field.
Cloudflare Proxy Does Not Apply
The orange cloud (proxy) only affects HTTP/HTTPS records (A, AAAA, CNAME). TXT records are served directly, unaffected by proxy state.
Common Miss
- Using
@when the record needs a subdomain — SPF at@, DMARC at_dmarc, DKIM at{selector}._domainkey - Adding two SPF records → PermError — always merge into one
- Missing the leading underscore on
_dmarc— record won’t be recognized
Verify with the DNS query tool.
Related
Browse every major DNS record type, check the DNS glossary entry, and see the TXT record glossary entry.