The short answer

Most Cloudflare DNS problems come from one of a few settings that behave differently from a plain DNS host. Start by confirming that Cloudflare is really the authoritative provider for the domain, then check the record's proxy status, the SSL/TLS encryption mode, and DNSSEC. The symptom usually points at the setting:

SymptomUsually meansSection
Zone stays in Pending Nameserver UpdateThe registrar has not published the Cloudflare name servers, extra name servers are listed, or an old DS record is still at the registrarDelegation
SERVFAIL after moving to CloudflareA DS record from the previous DNS provider no longer matches the zoneDNSSEC
Lookups return Cloudflare IP addresses, not your serverThe record is proxied (orange cloud), which is expected for web trafficProxy status
Mail, SSH, FTP or a game server stops workingA non-HTTP hostname is proxiedProxy status
ERR_TOO_MANY_REDIRECTSFlexible SSL/TLS mode while the origin redirects HTTP to HTTPSSSL/TLS modes
Error 525 or 526Cloudflare cannot complete HTTPS to the origin, or the origin certificate fails validationSSL/TLS modes
A service says it cannot find your verification CNAMEThe record is proxied or flattened, so the CNAME is never returnedVerification records
example.com works but www.example.com does not (or the reverse)One of the two names has no record, or no redirectApex and www

Step 1: confirm Cloudflare is authoritative

A Cloudflare zone on a full setup only answers for your domain once the parent zone (the TLD) delegates to the two name servers Cloudflare assigned to it. Until then the dashboard shows Pending Nameserver Update and every record you add is invisible to the rest of the internet. Cloudflare lists these causes, in order:

  • The change was never published. The registrar's form was not saved, the change went to a different domain or account, or the domain is locked, mid-transfer or in redemption. Some registrars also ask for an email or two-factor confirmation.
  • The names do not match exactly. Each zone gets its own pair, such as two names under ns.cloudflare.com. Copy them from the zone's Overview page; a pair from another zone or account will not activate this one.
  • Other name servers are still listed. Remove the old provider's servers unless you deliberately run a multi-provider setup.
  • A stale DS record is at the registrar. See DNSSEC below.

Check what the parent zone publishes rather than trusting the registrar's control panel:

CheckmacOS or LinuxWindows PowerShell
Name servers a public resolver seesdig NS example.com @1.1.1.1Resolve-DnsName example.com -Type NS -Server 1.1.1.1
Delegation straight from the TLD serversdig +trace example.com NSResolve-DnsName example.com -Type NS -Server a.gtld-servers.net
DS records at the parentdig DS example.comResolve-DnsName example.com -Type DS

The a.gtld-servers.net example only works for .com and .net; for other TLDs, look up the TLD's own servers first (for example dig org. NS). Registrars can take up to 24 hours to publish a change, and Cloudflare deletes Free plan zones that stay pending for 28 days. Our delegation and glue records and NS record pages explain what the parent zone holds.

Step 2: proxy status (orange cloud and grey cloud)

Every A, AAAA and CNAME record on Cloudflare has a proxy status. No other record type can be proxied; MX, TXT, CAA and the rest are always DNS only.

Proxied (orange cloud)DNS only (grey cloud)
What a lookup returnsCloudflare anycast addresses, never your originThe value you entered
TTLFixed at Auto (300 seconds)Whatever you set
TrafficHTTP and HTTPS through Cloudflare's CDN, WAF and DDoS protectionStraight to your server; Cloudflare only answers DNS
Use forWebsites and web APIsMail servers, SSH, FTP, VPNs, game servers, and records a third party must read as written

The problems this causes are predictable:

  • "DNS is pointing at the wrong IP." A proxied record is supposed to return Cloudflare's addresses. To confirm the record value, look in the dashboard, not at dig output. A cf-ray response header shows the request went through Cloudflare.
  • Mail or another protocol stops working. SMTP, IMAP, POP3, SSH and similar protocols do not pass through the standard HTTP proxy. The host an MX record points to, often mail.example.com, must be DNS only.
  • One proxied record changes the whole name. If any A or AAAA record on a name is proxied, Cloudflare treats every A and AAAA record on that name as proxied, and a proxied hostname anywhere in a CNAME chain proxies the request.
  • The origin IP leaks. A DNS-only record, an SPF include or a mail host on the same server as the website can reveal the address the proxy is meant to hide.
  • Long requests fail with error 524. Cloudflare returns 524 when a proxied origin takes longer than the proxy read timeout (125 seconds unless an Enterprise plan raises it). Move long-running endpoints to a DNS-only hostname.

Step 3: CNAME flattening and the zone apex

Standard DNS does not allow a CNAME at the apex of a zone (see CNAME at the zone apex). Cloudflare works around it with CNAME flattening: it follows the CNAME chain itself and answers with the final A and AAAA addresses instead of the CNAME.

  • A CNAME at the apex is flattened automatically on every plan, and every proxied CNAME is effectively flattened because it answers with Cloudflare addresses.
  • Paid plans can also flatten individual DNS-only CNAMEs or turn on flatten all CNAME records. Flattening all of them breaks services that expect to read your CNAME, such as domain verification and DKIM keys hosted by an email provider.
  • If the final target has no A or AAAA record (a dangling CNAME), a flattened name returns an empty answer (NOERROR with no data), which looks like a record that "has not propagated". Check the target, and see dangling DNS and subdomain takeover.
  • A CNAME that points at a hostname in a different Cloudflare account is blocked with Error 1014: CNAME Cross-User Banned unless the target is set up for it (Cloudflare for SaaS).
  • If you are moving from a provider that used ALIAS or ANAME records, create a CNAME on Cloudflare instead; flattening does the same job.

Step 4: SSL/TLS encryption modes and redirect loops

For proxied hostnames there are two HTTPS connections: visitor to Cloudflare, and Cloudflare to your origin. The encryption mode on the SSL/TLS overview page controls only the second one.

ModeCloudflare to originTypical failure
OffHTTP, and HTTPS visitors are sent to HTTPNo HTTPS at all; not recommended
FlexibleHTTP on port 80ERR_TOO_MANY_REDIRECTS when the origin redirects HTTP to HTTPS; traffic to the origin is unencrypted
FullHTTPS on port 443, certificate not checkedError 525 if the origin has no working TLS on 443
Full (strict)HTTPS, certificate must be valid, unexpired and match the hostnameError 526 if the certificate is expired, self-signed or for another name

The redirect loop is the classic one. The visitor asks Cloudflare for HTTPS, Flexible mode fetches the page from the origin over HTTP, the origin redirects to HTTPS, and the cycle repeats. Fix it by installing a certificate on the origin (a free Cloudflare Origin CA certificate works with Full (strict)) and switching to Full (strict), then let Cloudflare's Always Use HTTPS setting do the redirect instead of the origin. Redirect Rules and edge certificate settings can also loop, so check them if the mode is already correct. Our HTTPS and HTTP redirects article covers redirect chains in general.

If the edge certificate itself stays in Pending Validation, the certificate authority cannot complete domain control validation. The usual causes are a CAA record that does not allow Cloudflare's certificate authorities, a WAF rule or Under Attack mode challenging requests to /.well-known/, a Worker route that intercepts those paths, broken DNSSEC, or an old _acme-challenge TXT record. See the CAA records deep dive.

Step 5: DNSSEC when moving to Cloudflare

The DS record lives at the registrar, not at the DNS provider. If you change name servers while the old provider's DS record is still published, validating resolvers expect the old keys, find Cloudflare's signatures (or none), and return SERVFAIL. The zone can also stay pending. Cloudflare's documented order is:

  1. Remove the DS record at the registrar (or turn DNSSEC off there).
  2. Wait for the DS TTL to expire at the parent, commonly 24 to 48 hours. dig DS example.com should come back empty.
  3. Change the name servers to Cloudflare and wait for the zone to become Active.
  4. Enable DNSSEC under DNS > Settings and add the DS record Cloudflare shows at the registrar. Cloudflare signs with algorithm 13 (ECDSA P-256 with SHA-256). Domains on Cloudflare Registrar get the DS record added automatically, which can take a day or two.

If your old provider can publish Cloudflare's DNSKEY, a multi-signer migration avoids the unsigned window. To turn DNSSEC off later, remove the DS record first and keep Cloudflare signing until the DS TTL has passed. To test whether DNSSEC is the cause of a SERVFAIL:

CommandWhat it shows
dig example.com A @1.1.1.1SERVFAIL from a validating resolver
dig example.com A @1.1.1.1 +cdAn answer with checking disabled points to a validation failure
dig DS example.com +shortCompare the key tag with the DS record Cloudflare shows

For a deeper walk-through, read debugging DNSSEC validation errors, broken versus missing DNSSEC, and the DS record and DNSKEY record pages.

Step 6: domain verification and third-party records

Services such as Google Workspace, Microsoft 365, email senders, certificate authorities and hosting platforms ask you to publish a record and then look it up.

  • TXT records are never proxied, so they fail only if the name or value is wrong. Cloudflare's Name field is relative to the zone: enter _dmarc, not _dmarc.example.com, or you get _dmarc.example.com.example.com.
  • Verification and DKIM CNAMEs must be DNS only and must not be flattened. A proxied or flattened CNAME answers with addresses, so the service never sees the target it asked for.
  • Hosting platforms that issue their own certificates, such as Vercel, need their HTTP validation requests to reach them. If the platform says the domain is misconfigured or the certificate is pending, set the record to DNS only until it validates. See troubleshooting DNS on Vercel.
  • On a partial (CNAME) setup Cloudflare does not check name servers. It checks for a cloudflare-verify TXT record at your existing DNS provider instead.

For email records specifically, see why email is not delivered and SPF and DMARC misconfigurations.

Step 7: apex and www

example.com and www.example.com are separate names, and each needs its own record. The common Cloudflare setup is an A record (or a flattened CNAME) at the apex and a proxied CNAME for www that points at the apex, then one Redirect Rule that sends one name to the other. Cloudflare can only run a redirect for a hostname that has a proxied DNS record, so a www name with no record never reaches the rule and returns NXDOMAIN instead.

Keep the redirect in one place. If the origin redirects www to the apex and a Cloudflare rule redirects the apex to www, the browser loops. Test the whole chain with:

CommandWhat to look for
curl -sIL https://example.comEach redirect hop and the final 200
curl -sIL https://www.example.comThat it ends on the same URL as the apex
curl -sI https://example.com | grep -i cf-rayWhether the response came through Cloudflare

Cloudflare error codes that point at DNS

ErrorMeaningWhere to look
1000A proxied record points to a prohibited address, such as a Cloudflare IPThe A record value; it must be your origin
1001The hostname uses Cloudflare but the zone or record cannot be resolvedZone status and the record name
1014CNAME to a hostname in another Cloudflare accountThe CNAME target
1016Cloudflare cannot resolve the origin hostname, or a Tunnel behind it is downThe CNAME target or Tunnel
522Cloudflare could not connect to the originOrigin IP, firewall rules allowing Cloudflare's ranges
525 and 526TLS to the origin failed, or the certificate was rejectedSSL/TLS mode and origin certificate

Our HTTP status codes and DNS response codes references explain the standard codes these build on.

How DNS Panopticon helps

Run Domain Visualizer to see the records the public sees for a domain, including whether a name returns Cloudflare addresses (proxied) or your own. Security Posture grades DNSSEC, delegation, mail and web settings and links each finding to the article that explains it. Website Recon matches the name servers and addresses against its provider catalog, so it confirms whether the delegation now points at Cloudflare and whether the site is served through its CDN. For a DNS-only service such as a mail or SSH host, the TCP port check shows whether the port answers from the internet.

FAQ

Why does dig show a Cloudflare IP address instead of my server?

The record is proxied (orange cloud). Proxied records always answer with Cloudflare anycast addresses so that web traffic goes through Cloudflare. Check the record value in the dashboard, or set the record to DNS only if the hostname is not a website.

Should I use Flexible SSL to get HTTPS working quickly?

Only as a last resort. Flexible leaves the connection from Cloudflare to your server unencrypted and causes a redirect loop when the server redirects HTTP to HTTPS. Install a certificate on the origin, such as a free Cloudflare Origin CA certificate, and use Full (strict).

Do I have to turn off DNSSEC before moving my domain to Cloudflare?

Yes, unless you run a multi-signer migration. Remove the DS record at the registrar, wait for its TTL to expire, change the name servers, and then enable DNSSEC on Cloudflare and add its new DS record.

Sources and further reading