I started recently to learn about DNS, and I got stuck when using dig command in Linux. More exactly, I'd like to see the authoritative name servers (their names or IP addresses) that hold the answers to my DNS queries and I don't know how. As you probably already know, the dig's command output has 5 sections: HEADER, QUERY, ANSWER, AUTHORITY and ADDITIONAL. The last 3 include resource records found in the reply to the DNS request send by dig. The one that interests me is the AUTHORITY section which normally should show resource records of type NS (name server) that provide information about the authoritative name servers from which the answer to the initial query is retrieved. The authoritative servers are of course different from the cache servers that can improve efficiency.

Now, my problem is that every time I call dig the answer doesn't contain any AUTHORITY records. It is possible I don't know the proper options or some other issue which I'm not aware of may occur. What could be the reasons for not getting any authority answer and what should be done in order to get it? I would put an image of the terminal but I don`t have yet 10 reputation, but the question remains.

1 Answer 1


I just realized, "dig" uses implicitly the name servers found in /etc/resolv.conf. These are the ones to which "dig" sends by default any DNS query. Thus, if I type for instance "dig google.com" I don't get any authority records in the output, but if I specify a certain name server to query by its IP address, like "dig @byte.byte.byte.byte google.com", it might happen to get an answer that contains a non-zero authority section. So, as far as I can understand till now, the output of "dig" command can vary widely depending on which name server you query and if the database of that server is defined to contain an authoritative record as answer to your query then you get authority records in the reply. Hope I`m not far from truth. If you spot any mistakes or information that might be added please add a comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .