DNS not resolving? Fix NXDOMAIN and get alerted

DNS_PROBE_FINISHED_NXDOMAIN in Chrome and ERR_NAME_NOT_RESOLVED mean the lookup finished and found no such name, or never finished at all. Here is how to tell which, and what to change.

Updated

Short answer

Run dig example.com and read the status: NXDOMAIN means the name does not exist, SERVFAIL means the lookup broke, and NOERROR with no answer means the name exists but has no record of that type. Then use dig +trace and dig @1.1.1.1 to find whether the problem is at the registrar, the authoritative nameserver, or only in a cache.

Monitor your DNS records free

What the error means

NXDOMAIN is the DNS response code for a name that does not exist (RFC 1035 calls it "Name Error", and RFC 2308 uses the two terms interchangeably). Cloudflare's documentation describes DNS_PROBE_FINISHED_NXDOMAIN the same way: the lookup completed and the resolver decided the domain has no records. Other browsers word it differently, but the cause is the same.

It is not always your DNS. A visitor's own network or local resolver can cause it. Start by checking whether the problem is everywhere or only where you tested.

Diagnose with dig

Start hereShell
dig example.com A
dig example.com A @1.1.1.1
dig +trace example.com
  • `dig example.com`: uses your default resolver. Read status: in the header: NXDOMAIN, SERVFAIL or NOERROR.
  • `dig @1.1.1.1 example.com`: asks a different public resolver. If it works there and fails locally, the problem is your resolver or its cache.
  • `dig +trace example.com`: follows the lookup from the root servers down to the authoritative nameservers, so you see which step stops answering.

Then ask the authoritative nameserver directly, using a name from dig NS example.com +short:

Query the source of truthShell
dig NS example.com +short
dig example.com A @ns1.example.net +norecurse

If the authoritative server returns the record but public resolvers do not, you are waiting on caches or a delegation problem. If it does not return the record, the record was never created there.

Common causes

CauseHow to checkFix
Record missingAuthoritative server returns NOERROR with no answer, or NXDOMAIN for the nameAdd the A, AAAA or CNAME record at the DNS provider that actually serves the zone
Nameservers changed at the registrar, records not copieddig NS example.com shows the new provider, whose zone is emptyRecreate the records at the new provider before or when switching
Registrar points at old nameserversdig +trace ends at servers that do not know the domainUpdate the NS records at the registrar to the provider you are using
Cached answerdig @1.1.1.1 works, your resolver does notWait for the TTL to expire, or flush the local resolver cache
CNAME target missing or at the apexThe CNAME target does not resolve, or a CNAME sits at the zone rootPoint to an existing target, and use an A record or your provider's flattening at the root
DNSSEC mismatchValidating resolvers return SERVFAIL, dig +cd worksMake the DS record at the registrar match the keys at the DNS provider, or remove it

For the DNSSEC case, Cloudflare documents the test: run dig A example.com @1.0.0.1 +dnssec +cd +short. If +cd (checking disabled) returns an answer but the same query without it returns SERVFAIL, DNSSEC validation is what fails. Cloudflare notes this often happens when nameservers change but the DS records are not updated.

Why changes seem slow

There is no single propagation event. Resolvers keep each answer until its TTL (time to live) runs out, so a long TTL means a change reaches users later. Cloudflare's TTL documentation describes the trade-off: longer TTLs speed up lookups, and also slow down updates.

Failed lookups are cached too. RFC 2308 says a resolver may cache an NXDOMAIN answer, for a time taken from the SOA record's MINIMUM field and the SOA's own TTL. If someone looked up the name before you created the record, they may keep seeing NXDOMAIN until that time passes.

Set it up in UptimeIO

A DNS monitor resolves your domain on a schedule and compares the answer with the values you expect. It does not check that the resolved address is reachable, so pair it with an HTTP monitor if you want both.

  1. Create a monitor and choose the DNS type.
  2. Enter the domain, such as example.com.
  3. Click Add Record, pick a record type and check the expected values UptimeIO fills in from the current lookup.
  4. Optionally enter a resolver IP under Advanced Options, then set the interval.
  5. Choose where alerts go: email, Slack, Telegram, Pushover or a webhook.
  • Record types: A, AAAA, CNAME, MX, TXT and NS, each once per monitor.
  • Match mode: Match Any passes if at least one expected value appears. Match All needs every expected value. The monitor passes only when every record row passes, and a row fails when no records of that type exist.
  • DNS server: leave empty for normal resolution, enter an IP such as 1.1.1.1 for a consistent resolver, or enter your authoritative nameserver's IP to see changes as soon as you make them. It must be an IP address, not a hostname.
  • Interval: 30 seconds to 24 hours. The shortest is 5 minutes on Free, 1 minute on Pro and 30 seconds on Scale.
  • Incidents: an incident opens only after several probe locations confirm the failure.

If you use GeoDNS, answers differ by location, so use Match Any rather than one fixed address.

Questions

What does DNS_PROBE_FINISHED_NXDOMAIN mean?
The DNS lookup completed and the resolver determined that the domain does not exist. The cause is a missing record or zone, wrong nameservers, a cached failure, or a problem on the visitor's own network.
How long does DNS take to update?
It depends on the TTL of the old record and on any cached failure. Resolvers keep an answer until its TTL expires, so there is no fixed time. Lowering the TTL before a change shortens the wait.
Why does my domain work on one network but not another?
Different resolvers hold different cached answers. Run dig against a public resolver such as 1.1.1.1 and against your authoritative nameserver to compare.
What is the difference between NXDOMAIN and SERVFAIL?
NXDOMAIN says the name does not exist. SERVFAIL says the resolver could not get a usable answer, which can be an unreachable nameserver or a DNSSEC validation failure.
Can I get alerted when DNS records change?
Yes. A DNS monitor compares the resolved values with the ones you expect and alerts when they differ or when no records of that type are found.

Related

Start monitoring in a few minutes

Start monitoring free

Free plan · 50 monitors · No credit card required