Finding name server records for domains using Dig

Posted on 10-05-2018 by Nadir Latif


Source: https://stackoverflow.com/questions/38021/how-do-i-find-the-authoritative-name-server-for-a-domain-name

Dig is a useful command line tool which allows retrieving DNS records for a domain.

Authoritative name servers

are servers that provide DNS information about a domain. An Authoritative name server may be a primary or secondary name server. A primary name server contains definitive and reliable information about a domain. A secondary name server is a slave name server which contains replica of dns records on a primary name server

To fetch the list of name server records for a domain we can use the command: dig NS {domain_name}. If we add the +short flag, then a summary of the information is returned. Other types of DNS records may be fetched similarly