Home » DNS » Domain Not Resolving: NXDOMAIN, SERVFAIL and How to Tell Them Apart
Domain Not Resolving: NXDOMAIN, SERVFAIL and How to Tell Them Apart
When a browser says the server's IP address could not be found, or shows DNS_PROBE_FINISHED_NXDOMAIN, the problem is before any web server is involved. The name did not turn into an IP address. The fix depends on which kind of failure it is.
Step 1: ask DNS directly and read the status
dig example.com
Look at the status: in the header of the response:
| Status | Meaning | Usual cause |
|---|---|---|
NOERROR with an answer |
The name resolves | The problem is not DNS |
NOERROR with no answer |
The name exists but has no record of this type | Missing A or AAAA record |
NXDOMAIN |
The name does not exist | Domain expired, wrong nameservers, record missing, typo |
SERVFAIL |
The resolver could not get a valid answer | Broken nameserver, or a DNSSEC problem |
| No reply / timeout | Cannot reach any DNS server | Network issue or dead nameservers |
Without dig on Windows: nslookup example.com.
Step 2: rule out a local cache
Ask a public resolver instead of your own:
dig @1.1.1.1 example.com
dig @8.8.8.8 example.com
If these answer correctly and your normal lookup fails, the problem is local: flush your computer's DNS cache (ipconfig /flushdns on Windows), restart the router, or switch DNS servers.
Step 3: check the registration
If every resolver says NXDOMAIN, check whether the domain itself is registered and active. Look it up with whois example.com or your registrar's dashboard. An expired domain stops resolving, and some registrars replace its nameservers with parking servers.
Step 4: check the delegation
The registrar holds the list of nameservers for your domain. Those must be the servers where your records actually live.
dig NS example.com +short
Then ask one of those servers for your record:
dig example.com @ns1.your-dns-provider.com +short
Findings:
- The NS list is not what you expected. Records are being served from a place you are not editing. You may have changed records at the host but kept the registrar's nameservers, or the reverse. Make the nameservers at the registrar match the provider holding your zone.
- The nameserver answers
REFUSEDor has no zone for your domain. The zone was never created, or was deleted. Recreate it. - Different nameservers return different answers. One of them is out of sync. This causes intermittent failures that are hard to reproduce.
For a complete picture from the root down:
dig +trace example.com
It shows each step of the lookup, and the point where it stops is where the problem is.
Step 5: check the records
At the DNS provider that is actually authoritative, confirm:
- The root domain has an A record (IPv4) pointing to your server or hosting provider's address.
wwwhas an A record or a CNAME pointing at the right target.- There is no AAAA record pointing to an IPv6 address your server does not serve. Browsers prefer IPv6 when it exists, so a bad AAAA can break the site for some visitors while others see it fine.
- You did not create a CNAME on the root domain. A CNAME cannot coexist with the other records the root needs, such as MX and SOA.
If you get SERVFAIL
SERVFAIL often points to DNSSEC. If you enabled DNSSEC at the registrar and then moved DNS providers without updating or removing the DS record, validating resolvers refuse the answer and the domain fails for many users. Remove the old DS record at the registrar or publish matching keys at the new provider.
Common mistakes
- Editing records at the web host while the registrar still points to other nameservers.
- Waiting for "propagation" when the real cause is a missing record or wrong nameserver. Propagation is only caching. It cannot make up a record that was never created.
- Forgetting that a lookup that returned "does not exist" is cached too, for a period set by the zone's SOA record. A fixed record can appear missing for a while on resolvers that already asked.
Frequently Asked Questions
My domain works on my phone but not on my computer. Is DNS broken?
Probably not for everyone. Your computer or router may be holding a stale or failed lookup. Flush the DNS cache, or test with another resolver such as 1.1.1.1 or 8.8.8.8, before changing any records.
How long do DNS changes take?
It depends on the TTL of the old record and on the caches that already hold it. Many changes show up within minutes, but resolvers may keep the old answer until the TTL runs out. A newly created record that never existed before is not affected by old caches, except for caching of 'does not exist' answers.
What does DNS_PROBE_FINISHED_NXDOMAIN mean?
The DNS server answered that the name does not exist. The record is missing, the domain is not delegated, or the name was typed wrongly.
Found a mistake or still stuck? Contact us. See how we write and check these guides in our editorial policy, or read about DocumentGuy.