≡ Menu
Home > whatis > What Is NXDOMAIN?

What Is NXDOMAIN?

What is NXDOMAIN? How does nxdomain affects my browsing? Explains the relationship between NXDOMAIN and DNS Hijacking.

A DNS server is used to translate a domain name into an IP address or vise versa. For example, when you type dnsknowledge.com in your web browser, an authoritative dns server translate a domain name such as dnsknowledge.com into an IP address such as 67.228.49.226. However, if you try dnsknowledgefoobarexamplefackdomain.com, you will get an error indicating non existing domain name.

Non-existent Internet Domain Names Definition

NXDOMAIN is nothing but non-existent Internet or Intranet domain name. If domain name is unable to resolved using the DNS, a condition called the NXDOMAIN occurred. In this example, try to find out an ip address for the domain called abcquq12examfooltest.com using the nslookup or host command line option:
nslookup abcquq12examfooltest.com
OR
host abcquq12examfooltest.com
Sample outputs:

Host abcquq12examfooltest.com not found: 3(NXDOMAIN)

Since domain name is the invalid domain, you got a NXDOMAIN response i.e an error message indicating that domain is either not registered or invalid.

DNS Hijacking And NXDOMAIN

A few ISPs such as Optimum Online, Comcast, Time Warner, Cox Communications, RCN, Rogers, Charter Communications, Verizon, Virgin Media, Frontier Communications, Bell Sympatico, Airtel, and many others started the bad practice of DNS hijacking on non-existent domain name for making money by displaying the internet advertisements. These ISP and/or advertiser may collect your personal data too. These ISPs DNS server sends a fake IP address for all the NXDOMAIN responses. In most cases your browser will connect to a fake IP address server which will display page with advertising, instead of a proper error message to you. In some cases it is possible to obtain sensitive information too.

When you search for a Web site (domain) that doesn’t exist, these ISPs will hijack your session (also called as Error Redirection service), and it will show suggestions for sites that are similar to what you entered with tons of advertisements. In most circumstances DNS Error Redirection cause problems for customers running various specialty programs (such as game servers) or services (such as corporate vpn client and servers).

Example: DNS Hijacking On Non-existent Domain Name (NXDOMAIN)

The domain name foobar.dnsknowledge.com or a web site http://foobar.dnsknowledge.com doesn’t exist. If you run query for such address most ISPs will hijack your session and display advertisements. A typical dns query will look like as follows using the nslookup command on MS-Windows or host command on Mac OS X/Unix/Linux computer:
nslookup foobar.dnsknowledge.com
OR
host foobar.dnsknowledge.com
Sample outputs:

foobar.dnsknowledge.com has address 92.242.132.8

As a result of this hijacking you will see the following page:

Fig.01: My ISP Has Hijacked Nxdomain Page

My ISP Has Hijacked Nxdomain Page

Example: Non-existent Domain Name (NXDOMAIN) Response

In this example, I’m using our corporate resolving DNS name servers i.e. I’m not using ISP’s dns server. This ensures that my DNS session can not be hijacked. A typical dns query will look like as follows using the nslookup command on MS-Windows or host command on Mac OS X/Unix/Linux computer:

nslookup foobar.dnsknowledge.com
OR
host foobar.dnsknowledge.com
Sample outputs:

Host foobar.dnsknowledge.com not found: 3(NXDOMAIN)

No ip address returned and I got clean error message. This suggest that the domain foobar.dnsknowledge.com doesn’t exists. I’ve disabled hijacking of NXDOMAIN responses using my own resolving caching dns server:

Fig.02: No DNS hijacking / DNS Redirection Example

Fig.02: No DNS hijacking / DNS Redirection Example

Summary

  1. NXDOMAIN error message means that a domain does not exist.
  2. Some ISPs started DNS hijacking or DNS redirection for NXDOMAIN error messages.
  3. It is the practice of redirecting the resolution of Domain Name System (DNS) names to other DNS servers or web servers.
  4. Commonly used for displaying advertisements or collecting statistics.
  5. This practice violates the RFC standard for DNS (NXDOMAIN) responses.
  6. Phishing : Cross-site scripting attacks can occurred due to malicious hijacking.
  7. Censorship : DNS service providers to block access to selected domains.
{ 25 comments… add one }
  • AMDphreak April 4, 2011, 12:36 pm

    thanks for contributing.

  • Raven August 19, 2011, 5:10 pm

    Thank you for putting an understandable explanation here. I really appreciate it!

  • nottinhill October 19, 2011, 4:47 am

    Could you please explain the DNS Hijacking part a bit better? Also there are some grammer error which makes it harder to understand. Thanks!

  • police February 14, 2012, 7:18 pm

    @nottinhill: it’s GRAMMAR

    fail.

  • admin March 13, 2012, 3:57 pm

    nottinhill / police:

    Thanks for the heads up. The article has been updated.

  • Dude August 18, 2013, 9:40 pm

    great article

  • Boodah June 13, 2014, 7:06 pm

    Somebody knows how to prevent NXDOMAIN to be hijacked by our ISP’s?

  • Brian I. December 3, 2014, 11:37 pm

    You can switch your DNS settings and use a third-party provider. They are usually faster and may have more features (such as filtering & phishing protection). Two examples are Google’s Public DNS and OpenDNS. Both are free. Note that OpenDNS has recently switched from hijacking NXDOMAIN and stopped redirecting NXDOMAIN errors and Google has never been doing it. However, OpenDNS is not entirely RFC compliant, as they explain below:
    “However, we still intercept phishing and malware attacks, which technically violate the RFCs. But we think the RFCs will change overtime to accommodate and endorse this kind of optional, opt-in, interception of malicious and harmful traffic…”

  • zezinho February 5, 2015, 7:34 am

    Boodah : yes. To prevent, you must configure manually another DNS server instead of your ISP’s one. Some very known examples are Google’s 8.8.8.8 and 8.8.4.4, it is valid until Google starts hijacking too ;-)

  • Srimaan Arya May 20, 2015, 7:57 am

    GooD and useful !!

  • Chrissy June 6, 2015, 12:57 am

    I wanted to thank you for the extensive knowledge. It’s helped me understand what’s going on. Every time I log on to a particular site this 3(NXDOMAIN) is sure to be on within a couple minutes. Thanks again.

  • don July 22, 2015, 12:12 pm

    Thanks this was really useful! I really like people that do things like this for the good of everyone.

  • Cause I can August 16, 2015, 11:12 am

    Grammar??

  • SB80 September 16, 2015, 11:38 am

    How could you not understand the DNS hijacking? It’s simple…ISP forwards you to an ad page if the domain you are trying to get to is not found.

  • David December 11, 2015, 3:55 pm

    In the case of Verizon FIOS, they use .12 as the last octet in their DNS servers. They provide an alternate ending in .14 which will not redirect NXDOMAIN. I just learned this in researching a problem I was having. I believe it is directly relevant to this thread. So far it seems to be correct and has solved another issue for me.

  • MARY L RIGG January 23, 2016, 4:49 am

    Receiving this error message cannot correct. If I have been hijacked how do I fix?

  • Monica March 8, 2016, 12:23 am

    Could anyone explain what it means when I show 2 email addresses for myself in my contact list. The one I’m concerned about has my correct email address but instead of gmail.com it has gmail.comandroid? My gmail has many odd things in it, as does my iPhone. It seems my mail is being forwarded to that address? I only use an iPhone to get my mail. On a side note I can see search history on my iPhone of specific sites that I did not look up. When I took my phone to my provider I was told either I looked it up or someone physically took my phone and looked it up. I have taken screen shots of a lot of strange things. Would be great if someone could explain to me.

  • Percy June 12, 2016, 4:27 pm

    I’m no where near an expert on these matters, Monica, but I’ll tell you the same thing I was told a week or so ago; “Go wipe all your stuff and make sure you get clean installs of everything.” Though I’m certain it goes deeper than that.

  • OSama June 21, 2016, 5:40 pm

    This depends on what DNS server you’re connected to, right? So at work, a domain that’s not hijacked, could be hijacked at home using your home ISPs DNS server?

  • OsamaBinLogin June 21, 2016, 5:53 pm

    I think this is not a NXDomain question. I just checked and gmail.comandroid is not a registered domain name – NXDomain – probably somebody typed ‘android’ in or pasted it by accident. (I do stuff like that all the time.) Ah, in fact, nothing ending in .comandroid exists.

    Do you go websurfing to a site to get your gmail (like gmail.com) or do you use the Mail app? big difference. Either way, check your Mail settings in the Settings app (not in Mail itself) and make sure you’re set to your own email – you can send/receive emails you send to yourself and all that works.

    Your contacts – that’s a different story. You can delete any that you’re afraid of, or go change them so that they’re correct. Sometimes email programs add a contact for you if you send email to them – trying to be helpful – even if it was the wrong email address. That could have been the problem.

  • Nida Noe February 7, 2019, 5:08 pm

    Just wanted to mention keep up the excellent job!| Greetings from California!

  • dody February 25, 2019, 11:05 am

    NO, its spelling errors

  • Anonymous March 13, 2019, 11:02 am

    Curious, is your “own resolving caching dns server” a full DNS server, or are you running a local DNS proxy like Acrylic?

  • Jonnie Grace Torres May 16, 2020, 1:59 am

    what is problem about my net?

  • Iván Leiva Neumann November 5, 2021, 2:02 pm

    I need help
    I can send e-mails but I cannot receive.
    My domain is Ilustrador.cl and it has an account in (google)
    My e-mail is [email protected]
    I don’t understand why it doesn’t work.
    Can you help me ?
    attentively
    Ivan

Leave a Comment