A website can be healthy at the server and still appear completely offline when DNS not working errors prevent visitors from finding it. Effective DNS troubleshooting means identifying which layer failed: the record, authoritative nameserver, delegation, resolver, cache, DNSSEC chain, or application making the request. This guide provides a systematic way to isolate the fault instead of changing settings and waiting blindly for “propagation.”
The short version is to query the expected record, compare multiple public resolvers, ask the authoritative nameserver directly, and then trace the delegation path. Those checks reveal most DNS failures within minutes.
How DNS resolution works
When someone requests www.example.com, a recursive resolver looks for the answer on the user’s behalf. It may already have a cached response. Otherwise, it follows the DNS hierarchy from the root servers to the top-level domain and then to the domain’s authoritative nameservers.
The authoritative server returns records such as an A record for IPv4, an AAAA record for IPv6, or a CNAME pointing to another hostname. The resolver caches that answer for its time to live, or TTL. Applications, operating systems, routers, browsers, and content delivery networks may maintain additional caches.
This interaction explains why DNS propagation is not a single global event. DNS updates are not pushed instantly to every resolver. Resolvers holding an old response may use it until its original TTL expires, while resolvers without a cached answer can retrieve the new value immediately. Modern encrypted DNS technologies such as DNS over HTTPS and DNS over TLS can also mean a browser uses a different resolver from the operating system.
Essential DNS troubleshooting commands
The dig command provides detailed answers, while nslookup is widely available and useful for quick checks. Replace the example domain with the affected hostname:
dig example.com A
nslookup example.com
dig example.com AAAA
dig www.example.com CNAME
dig example.com MXCompare Google Public DNS and Cloudflare’s public resolver to detect cache or resolver differences:
dig @8.8.8.8 example.com A
dig @1.1.1.1 example.com AFind the listed nameservers, then query one directly:
dig example.com NS
dig @ns1.example-dns.com example.com AAn authoritative query bypasses ordinary recursive caches. Finally, use dig +trace to follow delegation from the DNS root:
dig +trace example.comCheck the status line, answer section, responding server, TTL, and whether the response is authoritative. NXDOMAIN means the queried name does not exist according to the responding DNS data; SERVFAIL commonly indicates validation, delegation, or authoritative-server trouble.
10 common DNS problems and how to fix them
1. Incorrect A or AAAA records
An A record maps a hostname to an IPv4 address, while an AAAA record maps it to IPv6. A typo, obsolete hosting address, or unintended duplicate can send visitors to the wrong server. Compare the values returned by recursive resolvers with the address configured by your hosting provider.
Test A and AAAA separately. A valid-looking AAAA record can cause failures for IPv6-capable clients if the destination does not accept IPv6 traffic. Correct or remove the bad record, confirm the web server is listening on the advertised address, and account for the existing record’s TTL.
2. Broken CNAME records
The relationship between an A record and CNAME is often misunderstood. An A record points directly to an IP address; a CNAME aliases one hostname to another hostname. A CNAME must not contain an IP address, and a name with a CNAME generally cannot also hold other record types.
Use dig www.example.com CNAME, then resolve the returned target. Fix misspellings, deleted targets, circular aliases, and excessively long chains. Traditional DNS does not allow a CNAME at the zone apex because the apex must also contain SOA and NS records, although some providers offer flattening or ANAME-like behavior.
3. Incorrect nameserver delegation
Publishing DNS records at one provider has no effect if the registrar delegates the domain to different DNS nameservers. Compare the parent delegation with the NS records served inside the zone:
dig example.com NS
dig +trace example.comIf the trace reaches old, misspelled, or unreachable nameservers, update the registrar’s delegation. Ensure every delegated server is authoritative for the zone and returns consistent data. When a nameserver is located inside the domain it serves, the parent may also require correctly registered glue addresses.
4. Stale DNS cache
A computer, router, browser, or recursive resolver may retain an old answer until its TTL ends. To learn how to flush DNS cache locally, use the platform’s supported method. On Windows, run ipconfig /flushdns. On systems using systemd-resolved, run resolvectl flush-caches. Browser and router caches may require separate clearing or restarting.
Flushing your device cannot remove an answer cached by an ISP or public resolver. Query the authoritative server directly to verify the current record, then compare it with recursive answers.
5. Negative caching and NXDOMAIN responses
DNS_PROBE_FINISHED_NXDOMAIN usually means the browser’s resolver received an NXDOMAIN response. Confirm the exact hostname, including the subdomain, and inspect it with dig. If the authoritative server also returns NXDOMAIN, create the missing record or correct the queried name.
Resolvers cache negative answers too. Under the behavior standardized in RFC 2308, the negative caching period is derived from the zone’s SOA data. Lowering a newly created record’s TTL cannot immediately clear an existing NXDOMAIN entry: the resolver cached the earlier negative response using its own negative TTL. You must wait for that entry to expire or test through a resolver that did not cache it.
6. DNSSEC mismatches
DNSSEC allows resolvers to verify signed DNS data through a chain of trust. Problems occur when the registrar publishes a DS record that does not match the active zone-signing keys, signatures expire, or a provider change leaves stale DS data at the parent.
Validating resolvers often return SERVFAIL, while non-validating tests may appear normal. Check DNSSEC details with dig example.com DNSKEY +dnssec and inspect the trace. If DNSSEC errors began after changing providers, either publish the new provider’s correct DS record or remove the stale DS record through the registrar before re-enabling signing.
7. Missing subdomain records
Registering example.com does not automatically create www.example.com, api.example.com, or other subdomains. Each requires a matching record unless a wildcard intentionally covers it. Query the failing hostname exactly and create the required A, AAAA, or CNAME record. Remember that a wildcard does not override an existing name and does not necessarily match every deeper label.
8. Incorrect MX records
MX records identify the mail servers receiving email for a domain. Their values must be hostnames rather than IP addresses, and those hostnames need working A or AAAA records. Lower preference numbers are tried first.
Run dig example.com MX, then resolve each mail host. Look for misspelled destinations, missing address records, unintended priorities, and mail hosts configured as aliases. Website DNS may work perfectly while faulty MX records cause mail-only failures.
9. Registrar-side configuration mistakes
Registrar settings can override otherwise correct zone work. Common mistakes include editing records in the registrar’s DNS panel while the domain uses third-party nameservers, failing to save nameserver changes, leaving an old DS record enabled, or allowing the domain to expire or enter a hold status.
Check the domain’s registration status, delegated nameservers, and DNSSEC settings independently. Avoid making repeated changes across multiple control panels; identify which provider is authoritative first.
10. Inconsistent answers across public resolvers
If Google and Cloudflare return different answers, compare their TTLs and ask each authoritative nameserver directly:
dig @8.8.8.8 example.com A
dig @1.1.1.1 example.com A
dig @ns1.example-dns.com example.com A
dig @ns2.example-dns.com example.com ADifferences may result from caches populated at different times, inconsistent authoritative servers, split-horizon DNS, geographic traffic steering, or a resolver-specific validation failure. If authoritative servers disagree, synchronize the zone before blaming propagation. If only recursive answers differ, note the remaining TTL and retest after expiration.
Cloudflare DNS troubleshooting considerations
Cloudflare records can be proxied or DNS-only. A proxied record returns Cloudflare edge addresses and hides the origin address; that is expected and does not mean the A record was ignored. A DNS-only record returns the configured origin value. Cloudflare explains the distinction in its proxy status documentation.
When diagnosing a proxied hostname, separate DNS resolution from the HTTP connection. Confirm that DNS returns Cloudflare addresses, then check SSL mode, origin reachability, firewall rules, and host-header handling. Temporarily switching to DNS-only can expose the origin for testing, but it also reveals the origin IP and bypasses proxy protections. Restore the intended setting after diagnosis.
A reliable troubleshooting sequence
- Confirm the exact failing hostname and requested record type.
- Query it with both
digandnslookup. - Compare responses from
8.8.8.8and1.1.1.1. - Find the authoritative nameservers and query each directly.
- Run
dig +traceif delegation or DNSSEC is suspect. - Check TTLs before making additional changes.
- Verify registrar status, nameserver delegation, DS records, and provider settings.
- After DNS is correct, test the web, mail, or application service separately.
This order prevents a common mistake: changing a correct record because one resolver still holds an older response.
Frequently asked questions
How long does DNS propagation take?
There is no universal propagation timer. A resolver with no cached answer can see an update immediately, while one holding the previous answer may retain it until that answer’s TTL expires. Delegation changes and negative responses have their own cache behavior. Check the remaining TTL rather than assuming every change requires a fixed waiting period.
Why does a website work on mobile data but not Wi-Fi?
The two networks probably use different recursive resolvers or cache states. The Wi-Fi router, ISP resolver, operating system, or browser may have a stale answer. Compare resolver responses, flush local caches, and test the authoritative server. Different IPv4 and IPv6 connectivity can also produce this symptom.
What is the difference between NXDOMAIN and SERVFAIL?
NXDOMAIN says the requested DNS name does not exist. SERVFAIL says the resolver could not complete the lookup reliably. DNSSEC validation failures, unreachable authoritative servers, broken delegations, and malformed responses commonly produce SERVFAIL.
Can lowering TTL speed up an urgent DNS change?
Only if the lower TTL was published before resolvers cached the existing answer. Changing the TTL at the same time as the destination does not shorten the lifetime of copies already cached. Likewise, a new record’s TTL cannot invalidate an earlier cached NXDOMAIN response.
Diagnose the layer before changing the record
Good DNS troubleshooting is evidence-driven. Query the record, identify the authoritative source, compare resolvers, inspect TTLs, and trace delegation. Once you know whether the failure lies in the zone, registrar, cache, DNSSEC chain, proxy, or destination service, the correct fix is usually straightforward—and far safer than making repeated speculative changes.