Nxdomain Error Fix

Get a detailed answer to nxdomain error fix along with step-by-step troubleshooting instructions and related DNS resources.

ReviewMyDNS is a free DNS propagation checker that queries 50+ global DNS servers to verify your DNS records. Check A, AAAA, MX, CNAME, TXT, NS, and SOA records instantly.

NXDOMAIN Error: What It Means and How to Fix It

NXDOMAIN stands for "Non-Existent Domain." It is the DNS response code returned when a resolver queried for a hostname and found definitively that no records exist for it in the DNS hierarchy. This is distinct from other DNS errors like SERVFAIL (server encountered an error) or REFUSED (resolver declined the query) — NXDOMAIN specifically means the authoritative nameserver confirmed the domain or record does not exist.

From a user's perspective, NXDOMAIN typically manifests as a browser "This site can't be reached" or "DNS_PROBE_FINISHED_NXDOMAIN" error, or a command-line output showing ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN.

Common Causes of NXDOMAIN

NXDOMAIN can occur at the full domain level (e.g., example.com returning NXDOMAIN) or at the subdomain level (e.g., app.example.com returning NXDOMAIN while example.com resolves fine). The cause depends on where in the DNS hierarchy the failure occurs:

  • Domain not registered or expired: If the domain is not registered or has lapsed, the TLD zone has no NS delegation for it. All queries return NXDOMAIN. Verify registration status with a WHOIS lookup.
  • Nameservers not configured at registrar: Without NS records at the registrar, resolvers cannot find the authoritative nameserver for the domain and return NXDOMAIN.
  • Missing DNS record for a subdomain: If example.com resolves but app.example.com returns NXDOMAIN, the specific A, CNAME, or other record for app is missing in the DNS zone. Add the record at your DNS provider.
  • Nameserver propagation in progress: After changing nameservers, the new nameservers must propagate through the TLD zone. During this 24-48 hour window, some resolvers query the old nameservers, which may no longer have your records, resulting in NXDOMAIN.
  • Domain suspended: Registrars can suspend domains for policy violations, ICANN disputes, or non-payment. A suspended domain's DNS delegation is removed, causing NXDOMAIN. Check your registrar account for notices.

How to Diagnose NXDOMAIN

Use dig to trace the resolution path and identify where the failure occurs:

# Check if the root domain resolves
dig A example.com

# Check a specific subdomain
dig A app.example.com

# Trace the full resolution path to see where NXDOMAIN originates
dig +trace example.com

# Query the authoritative nameserver directly
dig A example.com @ns1.yourprovider.com

If dig +trace returns NXDOMAIN from the TLD nameservers, the issue is at the domain registration level (expired or no NS delegation). If NXDOMAIN comes from your authoritative nameserver, the specific DNS record is missing.

Step-by-Step Fix for NXDOMAIN

  1. Run a WHOIS lookup on your domain to confirm it is registered, not expired, and not suspended. Any of these conditions will show NXDOMAIN for the entire domain.
  2. Check your nameservers at your registrar. Log in and verify the NS records match your DNS provider's nameservers. If they are blank or pointing to an old provider, update them.
  3. Check your DNS records at your DNS provider. Log in and verify the A, CNAME, or other records for the failing hostname exist and have the correct values.
  4. Check propagation with the DNS propagation checker. If some servers return the record and others return NXDOMAIN, propagation is in progress — wait for the TTL to expire.
  5. Flush your local cache after making fixes. On Windows: ipconfig /flushdns. On macOS: sudo dscacheutil -flushcache. On Linux: sudo systemd-resolve --flush-caches.

For subdomains returning NXDOMAIN, see the Subdomain Not Working guide for a detailed checklist. For NXDOMAIN caused by nameserver changes, see Why DNS Is Not Updating After 24 Hours. The NXDOMAIN error reference covers the technical details of how resolvers produce this response code.