Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
Networking

NXDOMAIN: why a domain does not resolve and how to fix it

What NXDOMAIN means, how it differs from SERVFAIL, and how to trace it to a typo, a missing record, broken delegation, an expired domain or a stale cache.

CloudSat teamNovember 18, 20266 min read
Abstract illustration of a search beam sweeping an empty map grid where one expected marker is missing
On this pageWhat NXDOMAIN does and does not mean

NXDOMAIN is the DNS answer for "this name does not exist". Browsers turn it into messages such as DNS_PROBE_FINISHED_NXDOMAIN or "This site can't be reached"; nslookup says "Non-existent domain" and dig shows status: NXDOMAIN. Sometimes the name really does not exist. Often it exists, but something between you and its nameservers gives the wrong answer. This guide sorts out which, in the order that finds the cause fastest.

What NXDOMAIN does and does not mean

DNS answers come with a result code, and three of them look alike in a browser:

Result Meaning Typical cause
NXDOMAIN The name does not exist anywhere in the zone Typo, missing record, wrong zone, expired domain
NOERROR with no answer The name exists, but not with the record type you asked for An A record exists but no AAAA, or the reverse
SERVFAIL The resolver could not get a trustworthy answer Broken DNSSEC, unreachable or misconfigured nameservers

The difference matters because the fixes differ. An NXDOMAIN comes from an authoritative statement, or a cached copy of one, that the name is absent. A SERVFAIL means nobody could answer properly.

Step 1: rule out the simple causes

  • A typo. Read the name letter by letter, including the top-level domain. exmaple.com returns NXDOMAIN very convincingly.
  • Only your device is affected. Try a phone on mobile data. If it works there, the problem is local: the hosts file, a VPN, a filtering DNS service or a stale cache.
  • A filter is answering for the name. Ad blockers and DNS filters such as Pi-hole or AdGuard Home can answer blocked names with NXDOMAIN on purpose. Check their logs for the domain.

Step 2: compare resolvers

dig www.example.com
dig @1.1.1.1 www.example.com
dig @9.9.9.9 www.example.com

On Windows, Resolve-DnsName www.example.com -Server 1.1.1.1 asks a specific resolver the same way.

If your configured resolver says NXDOMAIN and public resolvers return an address, the problem sits in your resolver or its cache. If every resolver agrees on NXDOMAIN, the problem is in the domain's own DNS, so move on to the authoritative servers.

Step 3: ask the authoritative nameservers

dig +short NS example.com
dig @ns1.dnshost.example www.example.com A +norecurse

The first command lists the domain's nameservers. The second asks one of them directly, skipping every cache. Now the answer is the truth as published:

  • NXDOMAIN from the authoritative server. The record does not exist in the zone. Create it, check its exact name (many dashboards append the domain automatically, so www.example.com typed into the name field becomes www.example.com.example.com), and query again.
  • An address from the authoritative server, NXDOMAIN elsewhere. The record exists, but resolvers still hold a cached negative answer. See step 5.
  • No NS answer at all, or NXDOMAIN for the bare domain. The delegation itself is broken. See step 4.

Step 4: check the delegation and the registration

A domain resolves only if its top-level domain points at nameservers that actually serve the zone. Trace the chain from the root:

dig +trace www.example.com

The output walks from the root servers to the .com servers to the domain's nameservers. Look at the last referral. If the TLD sends resolvers to nameservers that do not know the zone, perhaps because DNS hosting moved and the registrar still lists the old provider, every lookup ends in an error. Fix the nameservers at the registrar, and copy every record to the new DNS host before you switch.

If the TLD does not know the domain at all, check the registration:

whois example.com | grep -iE 'status|expir|name server'
Status shown Meaning
clientHold or serverHold The registrar or registry suspended the domain from DNS, often for non-payment, missing contact verification or an abuse case
An expiration date in the past The domain lapsed and its delegation may be removed
redemptionPeriod The domain expired and was deleted, but the registrar can usually still restore it, at a cost
pendingDelete The final days before the domain is released, when restoring is generally no longer possible

Expired and held domains return NXDOMAIN for every name in them, which is why an unpaid renewal can take down a website, its mail and its APIs at the same time. Turn on auto-renew for domains that matter, and keep the registrar's contact email current.

Step 5: wait out or clear a negative cache

Resolvers cache "does not exist" answers too, for a time set by the zone's SOA record: the smaller of the SOA's own TTL and its last field, the negative-caching TTL. If anyone looked up www before you created it, their resolver keeps answering NXDOMAIN until that time runs out. Read the value:

dig example.com SOA +noall +answer

The last number on the line is the negative-caching TTL in seconds. A value of 3600 means up to an hour. To see the new record sooner on your own machine, flush the DNS cache; public resolvers cannot be flushed by you, though some offer a purge form on their website.

To avoid this on the next launch, create records before anyone looks them up, and do not test a name before it exists. When you build a new site, point the domain at the server first and test afterwards.

Step 6: local causes on one machine

When only one computer or network sees NXDOMAIN:

  • The hosts file overrides DNS on that machine: /etc/hosts on Linux and macOS, C:\Windows\System32\drivers\etc\hosts on Windows.
  • A VPN or split DNS may send the name to a company resolver that knows nothing about public domains, or the other way around for internal ones.
  • Search domains on Linux and Windows can turn a short name such as intranet into intranet.corp.example and back again; test with the full name and a trailing dot.
  • Browser DNS over HTTPS means the browser may use a different resolver from the rest of the system. Compare with Resolve-DnsName or getent hosts, which use the system's resolver.

A related but different error, "Temporary failure in name resolution", means the machine could not reach any resolver at all, which is a network or configuration problem rather than a missing name.

If you run the zone

A few habits prevent most NXDOMAIN incidents on domains you manage:

  • Keep a copy of the zone, exported or in version control, so a move between DNS hosts never drops records.
  • After every change, query the authoritative servers directly; that is what the world will see once caches expire.
  • Monitor critical names from outside your network, so you learn about an expired domain or broken delegation before your users do.

The commands behind all of these checks are explained in nslookup, dig and Resolve-DnsName.

FAQ

Why do I get NXDOMAIN for a site that works for everyone else?

Your device or resolver gives a different answer than the rest of the internet: a hosts file entry, a DNS filter, a VPN or a stale cache. Compare with a public resolver to confirm, then clear or bypass the local layer.

How long until a newly created record stops returning NXDOMAIN?

Immediately on the authoritative servers. Resolvers that cached the negative answer keep it for up to the SOA's negative-caching TTL, often between a few minutes and an hour.

Can DNSSEC cause NXDOMAIN?

A broken DNSSEC setup usually produces SERVFAIL instead, because validating resolvers refuse answers they cannot verify. Test with dig +cd, which disables validation for that query: if the name resolves with +cd and fails without it, fix the DNSSEC records at the registrar and the DNS host.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.