How to get authoritative answers from nslookup?

37,536

You should have a look at how DNS works: http://en.wikipedia.org/wiki/Domain_Name_System.

Every domain is managed by authoritative name servers, and Yahoo server are not the authoritative ones for the stackoverflow.com domain; what's happening here is, when you ask them for info about a domain they are not authoritative for, they in turn ask the authoritative servers, and return their answer to you; thus, the answer you get for your query is non authoritative, because Yahoo's DNS servers are only relaying it to you from other servers, they are not the ones which actually manage that domain.

In order to find the authoritative name servers for a domain, you should perform a NS query:

> set query=ns
> stackoverflow.com

stackoverflow.com       nameserver = cf-dns02.stackoverflow.com
stackoverflow.com       nameserver = cf-dns01.stackoverflow.com

If you ask one of those servers, you'll get an authoritative answer.

Share:
37,536

Related videos on Youtube

Xiobiq
Author by

Xiobiq

Updated on September 18, 2022

Comments

  • Xiobiq
    Xiobiq almost 2 years

    Why is it "Non-authoritative"? Even when I look for yahoo.com ip with ns3.yahoo.com I get Non-authoritative answer.

    Why does a yahoo server keep stackoverflow's ip? From where do I get stackoverflow's ip if not from ns3.yahoo.com?

    • joeqwerty
      joeqwerty over 9 years
      Without getting into the details about how DNS works I'll simply say that in order to get an authoritative answer you need to query the name server(s) that is/are authoritative for the domain/name you're querying. Yahoo's name serves are not authoritative for the stackoverflow.com DNS namespace.
    • Gerard ONeill
      Gerard ONeill almost 7 years
      Nice answer -- why is it in the comments, and not in the answers?
  • Xiobiq
    Xiobiq over 9 years
  • Xiobiq
    Xiobiq over 9 years
  • Xiobiq
    Xiobiq over 9 years
    it's still Non-authoritative...
  • reirab
    reirab over 9 years
    I got an authoritative answer from cf-dns01.stackoverflow.com: i.imgur.com/0ITDNjx.png
  • TheLogicGuy
    TheLogicGuy over 7 years
    From Wireshark Lab: DNS v6.01: However, nslookup also indicates that the answer is “non-authoritative,” meaning that this answer came from the cache of some server rather than from an authoritative MIT DNS server