Find the hostname DNS couldn't look up

ERR_NAME_NOT_RESOLVED means Chrome couldn't get an IP address for a hostname, so it never tried to connect, and the error page says the server's IP address couldn't be found. Chrome folds almost every kind of failed lookup into this one code, from a name that doesn't exist to DNS servers that never answer. You'll meet it on the error page for an address you typed, and in DevTools when a script, image or API call on your page uses a hostname that doesn't resolve.

Where you'll see this error

  • For the address in the address bar, a failed lookup sets off a DNS probe. If Chrome's DNS setup can resolve a known-good name, Chrome decides your domain doesn't exist and shows DNS_PROBE_FINISHED_NXDOMAIN; if it can't, it blames the visitor's DNS or connection instead. Chrome falls back to ERR_NAME_NOT_RESOLVED itself when the probe didn't run or came back inconclusive, as net_error_helper_core.cc shows, and dns_probe_service_factory.cc sets out how each probe result is picked.

  • The probe covers only the main page. When a script, font, image or API request on your page uses a hostname that won't resolve, the rest of the page still loads, and that one request shows (failed) with net::ERR_NAME_NOT_RESOLVED in the Status column of the DevTools Network panel, as Chrome's Network reference describes. That's the version you'll catch while testing your own pages.

Why the lookup fails

  • A hostname that was never set up

    A subdomain your page or app relies on, such as an API or asset host, was never created, was deleted in a cleanup, or is spelled one way in your config and another way in DNS.

  • A service you embed went away

    A script or widget loaded from another company's domain fails once that domain stops resolving. Your page loads, but whatever the script did quietly disappears.

  • Nameservers that don't answer

    A lookup that timed out, or one the DNS servers answered with a failure, gets the same code as a name that doesn't exist. Nameservers that are down, or that no longer hold your zone, fail every lookup.

  • The domain's registration lapsed

    An expired domain stops resolving, and every hostname under it goes with it. The domain expiration guide covers renewal and grace periods.

  • The visitor's DNS is broken

    If the visitor's own resolver fails or is blocked, every site fails for them. When the probe runs, Chrome reports that as DNS_PROBE_FINISHED_BAD_CONFIG or DNS_PROBE_FINISHED_NO_INTERNET instead.

Chromium turns nearly every failed lookup, timeouts and server failures included, into ERR_NAME_NOT_RESOLVED in host_resolver.cc, and net_error_list.h defines the code as a host name that couldn't be resolved. Chrome's error guide says the hostname doesn't exist or now has a different IP address, and net_error_info.h lists the probe results.

Check every hostname your page uses

# List the hostnames written into your home page's HTML
curl -s https://yoursite.com/ | grep -oE 'https?://[a-zA-Z0-9.-]+' | sed -E 's#^https?://##' | sort -u

# Look each one up; a name that prints nothing after the colon has no address
# grep drops CNAME targets, which end in a dot, so only addresses remain
for host in yoursite.com www.yoursite.com api.yoursite.com; do
  printf '%s: %s\n' "$host" "$(dig +short "$host" | grep -v '\.$' | tail -n 1)"
done

# curl's exit code 6 means it couldn't resolve the host
curl -sS -o /dev/null https://api.yoursite.com/; echo "exit $?"

Read the lookup results

  • The first command finds only hostnames written into the HTML. Hostnames a script adds later show up in DevTools instead: open the Network panel, reload, and look for requests marked failed. curl's error list defines exit code 6 as a host that couldn't be resolved.

  • For a name that prints nothing, compare it letter by letter with the records at your DNS provider and with the hostname in your app's settings or environment variables. A missing record needs adding; a hostname in the code that was never meant to exist needs fixing in the code. A name can also print nothing because its CNAME points at a target that no longer exists; run dig on it without +short to see that CNAME, then point it somewhere that resolves or delete it. The NXDOMAIN guide, linked below, explains what each status in a full dig answer means.

How to fix a name that won't resolve

  1. Find the exact hostname that failedTake it from the error page or from the failed request in DevTools. When a single resource fails, its hostname differs from the page's own, and may be a subdomain of yours or another company's domain.
  2. Add or restore its DNS recordIf the name is yours, create the A, AAAA or CNAME record it needs at the DNS provider your nameservers point to. Confirm it with dig before you test in the browser again.
  3. Update or remove dead referencesIf the name belongs to a service you no longer use, or one that shut down, remove the script or link, or switch to the address the service now documents.
  4. Check the domain and its nameserversIf every name under the domain fails, confirm the registration is current and that the nameservers at your registrar are the ones holding your records.

Frequently asked questions

Why does my page load but show this error in DevTools?

The failing name belongs to something the page loads, not the page itself. Chrome resolved your domain, loaded the HTML, then failed to look up the host for a script, image, font or API call. Find that request in the DevTools Network panel; its address shows which hostname to fix.

Why do some visitors still get it after I added the record?

Their resolver may still remember that the name didn't exist. Resolvers keep that negative answer for a period set by your zone's SOA record, under RFC 2308, and the name starts resolving for them once it runs out. Lowering that time before planned changes shortens the wait next time.

How do I hear when my own domain stops resolving?

A record deleted during a DNS cleanup or a provider move can take the whole site offline at once, and the first warning is often a visitor who can't reach it. SiteCMD requests your home page every few minutes once you add the site, and it emails you when the site goes down and again once it recovers.