Skip to content
RU

NXDOMAIN (DNS RCODE 3): Why the Name Does Not Exist and How to Fix It

What it means: The DNS answered that this exact name does not exist in its zone; no record of any type is published for it.

  1. Check the spelling and the zone
  2. Run dig +trace on the name
  3. Confirm the registrar nameservers match
  4. Check the domain is not on hold
  5. Wait out the negative-cache TTL

Test your URL now

Looks the name up in public DNS and shows every record it returns.

Check your domain's DNS →

What NXDOMAIN means

NXDOMAIN is the common name for DNS response code 3. RFC 1035 calls it Name Error: «Meaningful only for responses from an authoritative name server, this code signifies that the domain name referenced in the query does not exist.» dig prints it in the header line:

$ dig nope.example.com
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4711
;; AUTHORITY SECTION:
example.com.  3600  IN  SOA  ns1.example.com. hostmaster.example.com. ...

It is a statement about the name, not about one record type. If the name exists but has no record of the type you asked for (say, an AAAA query for a host with only an A record), the answer is NOERROR with an empty answer section, the pseudo-code that RFC 2308 calls NODATA. Treating the two the same leads to the wrong fix: NXDOMAIN means create the name or fix the delegation; NODATA means add the missing record type.

Browsers turn NXDOMAIN into their own codes: Chrome shows DNS_PROBE_FINISHED_NXDOMAIN or ERR_NAME_NOT_RESOLVED, Node.js throws getaddrinfo ENOTFOUND, and curl exits with code 6, «Could not resolve host».

Causes

CauseHow to recognise itFix
Typo or wrong zonedig +trace ends at your nameservers with NXDOMAINCreate the record under the exact name
Record created at the wrong DNS providerThe registrar's NS list differs from where you editedEdit the zone at the provider the NS records name
Domain on clientHold or serverHoldTLD servers answer NXDOMAIN for the domain itselfRenew or resolve the hold at the registrar
Domain expired or not yet registeredWHOIS shows no active registrationRegister or renew it
Negative answer still cachedAuthoritative servers answer, a resolver still says NXDOMAINWait for the SOA-derived TTL or flush the resolver
Name exists only in an internal viewResolves on the office network, NXDOMAIN outsidePublish it in the public zone or use the internal resolver
Resolver filteringOne resolver says NXDOMAIN, public resolvers answerCheck the resolver's block lists

A domain on hold is easy to miss: RFC 5731 requires that for clientHold and serverHold «DNS delegation information MUST NOT be published», so the TLD answers NXDOMAIN for every name under the domain while your own nameservers still hold a perfect zone.

Why a fixed record can keep failing: negative caching

Resolvers cache NXDOMAIN like any other answer. Per RFC 2308, the authoritative server includes the zone's SOA record, and the negative TTL is «the minimum of the MINIMUM field of the SOA record and the TTL of the SOA itself». If you queried a name before creating it, resolvers that saw the NXDOMAIN keep returning it until that TTL runs out, even though your zone is now correct.

RFC 8020 goes further: a resolver that caches NXDOMAIN for a name SHOULD treat all names below it as non-existent too. Querying example.com during a registrar outage can therefore make www.example.com and api.example.com fail as well. Read the negative TTL from the SOA:

dig +noall +answer SOA example.com
# example.com. 3600 IN SOA ns1.example.com. hostmaster.example.com. 2026102001 7200 3600 1209600 300
#                                                    the last number (MINIMUM) is 300 seconds

How to fix it

  1. Ask an authoritative server directly, bypassing every cache:
    dig +short NS example.com
    dig @ns1.example.com www.example.com A +norecurse
    If it answers, the zone is right and you are looking at a cache or the wrong provider.
  2. Follow the delegation from the root:
    dig +trace www.example.com
    The step that returns NXDOMAIN tells you which layer is wrong: the TLD (domain not delegated, expired or on hold) or your own nameservers (record missing).
  3. Compare nameservers at the registrar and the TLD. The NS records in dig +trace at the TLD step must match the provider where you edit the zone (checking DNS records).
  4. Check registration status: whois example.com | grep -i status. A clientHold or serverHold status removes the domain from DNS until the registrar lifts it.
  5. Create the record under the exact name. In many DNS panels the zone name is appended automatically, so entering www.example.com in the name field creates www.example.com.example.com.
  6. Clear caches you control. On systemd-resolved: resolvectl flush-caches; on macOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. Public resolvers expire the entry when the negative TTL runs out.

How to confirm the fix

dig www.example.com @1.1.1.1 +noall +comments | grep status
# status: NOERROR
dig +short www.example.com @8.8.8.8
# 203.0.113.10

Check at least two public resolvers: one may still serve the cached NXDOMAIN. The DNS lookup queries the name in public DNS and lists every record it returns.

Related errors

A / AAAAIPv4 and IPv6 host addresses
MX RecordsDomain mail servers
TXT / SPFVerification & anti-spoofing
NS / SOAName servers & zone authority

Why teams trust us

12
DNS record types
SPF+DKIM
email protection
<1s
DNS response
3
check regions

How it works

1

Enter domain

2

Select record type

3

Get DNS response

What are DNS Records?

DNS (Domain Name System) translates domain names into IP addresses. DNS records are instructions that define where to route traffic, email, and how to verify domainownership.

Complete Lookup

Query all record types — A, AAAA, MX, NS, TXT, CNAME, SOA — in a single request.

Instant Results

Direct queries to authoritative servers. Results in milliseconds, no caching.

Security Checks

SPF, DKIM, and DMARC analysis to evaluate email protection against spoofing and phishing.

Export & History

Save check results. Compare DNS records before and after registrar changes.

Who uses this

DevOps

DNS check after deploy

Email marketers

SPF/DKIM/DMARC audit

SEO

DNS config audit

Sysadmins

DNS zone control

Common Mistakes

Missing SPF recordWithout SPF, emails may land in spam. Add a v=spf1 TXT record.
Single NS serverIf the only NS fails, the domain becomes unreachable. Use at least 2 NS servers.
CNAME conflicting with other recordsCNAME cannot coexist with MX or TXT on the same name — this violates RFC.
TTL set too highWith 86400s TTL, DNS changes take a full day. Lower TTL to 300 before migrations.
Missing PTR recordMail servers check PTR. Without it, emails may be rejected.

Best Practices

Set up SPF + DKIM + DMARCThe trio of records that protects your email from spoofing and improves deliverability.
Use 2+ NS serversDistribute NS servers across different networks for redundancy.
Lower TTL before migrationSet TTL to 300 at least 24-48 hours before an IP change for fast propagation.
Verify DNS after changesAfter updating records, confirm changes propagated correctly and no errors remain.
Add a CAA recordCAA restricts which Certificate Authorities can issue SSL certificates for your domain.

Get more with a free account

DNS check history, API keys and DNS change monitoring.

Sign up free

Learn more

Sources

Frequently Asked Questions

What is the difference between NXDOMAIN and NOERROR with no answer?

NXDOMAIN means the name does not exist at all. NOERROR with an empty answer (NODATA) means the name exists but has no record of the requested type.

How long is NXDOMAIN cached?

For the smaller of the SOA record's MINIMUM field and the SOA's own TTL, per RFC 2308. Many zones use a few minutes to an hour.

Why do I get NXDOMAIN for a domain I just registered?

The TLD may not publish the delegation yet, the nameservers may not be set, or a resolver cached an earlier NXDOMAIN. Check with dig +trace.

Can a domain on hold return NXDOMAIN?

Yes. Registries do not publish delegation for domains on clientHold or serverHold, so every name under the domain returns NXDOMAIN.

Is NXDOMAIN a problem with my computer?

Usually not. If several public resolvers return NXDOMAIN, the name really is missing from DNS. If only your resolver does, check its filtering or cache.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.