net::ERR_NAME_NOT_RESOLVED / DNS_PROBE_FINISHED_NXDOMAIN: this site can't be reached

The browser never even tried the web server. It asked “what IP is this name?” and got no usable answer — so you see a name-not-resolved error before any HTTP status code.

What the error means

net::ERR_NAME_NOT_RESOLVED
DNS_PROBE_FINISHED_NXDOMAIN
This site can't be reached — DNS_PROBE_FINISHED_NXDOMAIN
curl: (6) Could not resolve host: example.com
getaddrinfo ENOTFOUND example.com

These all mean the same thing: DNS lookup failed. No TCP connection was opened, so fixing TLS, redirects or the app itself will not help until the name resolves. A refused connection on a known IP is a different problem — see localhost refused to connect.

Quick triage

  1. Spelling. One wrong letter, a doubled TLD (example.com.com), or http:// pasted into a DNS box are the most common causes. Compare the URL carefully; decoding a messy link in the URL encoder can reveal hidden characters.
  2. Does the name exist anywhere? Ask a public resolver, not only your laptop:
    dig example.com A +short
    dig example.com AAAA +short
    nslookup example.com 1.1.1.1
    # PowerShell
    Resolve-DnsName example.com -Server 1.1.1.1
    If public DNS returns nothing (NXDOMAIN / empty), the records are missing, the wrong zone is published, or the name was never registered. If public DNS works but your machine fails, the problem is local (cache, hosts, VPN, filter).
  3. Propagation and pending proxy. New records and DNS-only ↔ proxied flips at a CDN can take minutes to hours. “Pending” SSL or an orange-cloud proxy that has not finished often shows as intermittent NXDOMAIN or wrong answers until the change settles.

Local causes that look like “the site is down”

CauseWhat to checkFix
Stale DNS cacheOld IP or NXDOMAIN remembered after a changeFlush the cache (commands below)
/etc/hosts or C:\Windows\System32\drivers\etc\hostsA leftover line pointing the name at 127.0.0.1 or nowhereRemove or correct that one line; do not wipe the whole file
VPN / corporate split DNSOnly works on/off the VPN; internal names fail outsideExpected for private zones; for public sites try without VPN
Pi-hole, AdGuard, router DNS filterBlocklists sometimes swallow whole domainsQuery the filter’s query log; whitelist if it is a false positive
Browser / extension DNSSecure DNS or an adblock extension overrides system DNSTry another browser or disable “secure DNS” briefly to test
IPv6 vs IPv4AAAA exists but is broken; A worksTest dig A and dig AAAA; fix the broken record or temporary IPv6 path
Docker / container DNSWorks on the host, fails inside a containerCheck Docker’s embedded DNS, extra_hosts, and whether the network can reach 8.8.8.8 / your resolver

Flush the DNS cache

# Windows (Admin Command Prompt or PowerShell)
ipconfig /flushdns

# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

# systemd-resolved (many Linux desktops)
sudo resolvectl flush-caches
# older nscd
sudo systemctl restart nscd

Browsers keep their own cache too: Chrome’s chrome://net-internals/#dns has a clear-host-cache button. After flushing, retry dig before blaming the site.

Missing or wrong DNS records

Docker and “could not resolve host” in builds

Inside Compose or Kubernetes, short names like db only resolve on the container network. From your laptop they will NXDOMAIN unless you use the published host port. Build-time failures often mean the build container has no working resolver (corporate DNS, offline builder, or a network: none build). Prefer fully qualified public hostnames for anything fetched during docker build, and pin base images so builds do not depend on flaky registry redirects.

Related

DNS_PROBE_FINISHED_NXDOMAIN · TypeError: fetch failed (Node) · net::ERR_CONNECTION_TIMED_OUT · localhost refused to connect · EADDRINUSE address already in use · ssh Connection timed out port 22 · ERR_TOO_MANY_REDIRECTS · ERR_SSL_PROTOCOL_ERROR · ECONNREFUSED ::1 · ETIMEDOUT / connect ETIMEDOUT · getaddrinfo ENOTFOUND · WebRTC ICE failed

Questions

What is net::ERR_NAME_NOT_RESOLVED?

The browser could not resolve the hostname to an IP address. No connection to a web server was made. Check spelling, DNS records, cache, hosts file, VPN and filters.

What does DNS_PROBE_FINISHED_NXDOMAIN mean?

The DNS server answered that the name does not exist (NXDOMAIN). Either the domain/record is missing, or a filter/VPN returned a fake NXDOMAIN.

Why does dig work but the browser fails?

Browser or OS cache, Secure DNS, an extension, or a different network path. Flush caches and try another browser or a private window.

How do I flush DNS on Windows, macOS and Linux?

Windows: ipconfig /flushdns. macOS: dscacheutil -flushcache and HUP mDNSResponder. Linux with systemd-resolved: resolvectl flush-caches.

Can a hosts file cause ERR_NAME_NOT_RESOLVED?

Yes. A bad line can point the name at a dead address or override a real one. Edit only that line; never delete the whole hosts file blindly.

Published .

Try it

Related guides

Newest guides