DNS debugging: delegation, stale nameservers and Cloudflare error 1000
What I learned pointing thaihuyhoang.me at Cloudflare Pages. Why some resolvers kept sending visitors to an old server, and how to tell where a DNS answer really comes from.
Written Nov 21, 20262 min read
- DNS
- Cloudflare
- dig
- Troubleshooting
On this page
What happened
I moved this site to Cloudflare Pages and pointed thaihuyhoang.me at it. Public resolvers (1.1.1.1, 8.8.8.8) sent the domain to Cloudflare, but my home network kept sending it to an old server that returned 502 Bad Gateway. On top of that, Cloudflare’s edge answered with error 1000: DNS points to prohibited IP.
It turned out to be two separate problems:
- The domain existed as two zones in two Cloudflare accounts, each with its own pair of nameservers. Only one pair was set at the registrar.
- In the live zone, the
Arecords for@andwwwpointed at Cloudflare’s own IP addresses.
Where a DNS answer comes from
- The TLD (here
.me) holds the delegation: which nameservers are authoritative for the domain. This is the source of truth. - The authoritative nameservers hold the actual records (
A,CNAME,MX…). - Recursive resolvers (the home router, the ISP, 1.1.1.1) cache both the delegation and the records for as long as the TTL allows.
When two answers disagree, work out which layer each one came from.
Commands
# 1. Delegation straight from the TLD (no recursion, no cache)
dig +norec @a0.nic.me thaihuyhoang.me NS +noall +authority
# 2. Ask an authoritative nameserver directly
dig +short @lina.ns.cloudflare.com thaihuyhoang.me A
# 3. What a resolver has cached; the second column is the remaining TTL
dig @1.1.1.1 thaihuyhoang.me A +noall +answer
dig @123.23.23.23 thaihuyhoang.me NS +noall +answer # VNPT resolver
# 4. DNS over HTTPS, in case something on the local network rewrites port 53
curl -s 'https://dns.google/resolve?name=thaihuyhoang.me&type=A'
# 5. Send a request to one specific IP, ignoring DNS
curl -sI --resolve thaihuyhoang.me:443:104.21.65.74 https://thaihuyhoang.me/
Lessons
dig NS through your own resolver can be stale
My router returned the old nameserver pair from its cache. Asking the TLD directly (command 1) showed the real delegation.
A leftover zone keeps answering
The zone that was no longer delegated still answered as if it were authoritative, and it listed its own nameservers with a TTL of 86400 seconds. My ISP’s resolver had cached that pair and kept going back to it, so restarting the home router changed nothing. The fix is to delete the leftover zone. Once the old nameservers stop answering for the domain, resolvers go back to the delegation from the TLD.
Error 1000 means a proxied record points at Cloudflare
It’s easy to copy the 104.21.x.x / 172.67.x.x addresses from nslookup into an A record. For Pages, delete those records and add the domain under Pages → Custom domains. Cloudflare then creates CNAME → <project>.pages.dev by itself.
Proxied records hide the origin
With the orange cloud on, the authoritative servers return Cloudflare IPs. With it off (grey cloud), they return the origin IP. That difference is a quick way to tell which zone you’re looking at.