Which is an authoritative source of information about each DNS domain name?

The Domain Name System (DNS) is “the phone book” of the Internet. It helps us connect to a computer or another network device by its name, instead of its IP address.

However, even though we specify human-friendly names in our queries, the underlying network protocols still use the IP addresses. The mappings between the two can be found in the so-called authoritative DNS servers. So, when we connect to a name via a browser, it automatically pings the servers for the corresponding address.

In this tutorial, we’ll show how to find the authoritative DNS server for a domain name.

2. Domain Name System (DNS)

DNS is the hierarchical and decentralized naming system for identifying a computer within a network (internet or intranet). The DNS resource records map easy-to-remember domain names (e.g., www.baeldung.com) to numeric IP addresses (for instance, 2606:4700:3108).

A domain namespace, also known as just a namespace, is a name service the Internet provides.

2.1. DNS Zones

A domain namespace is a hierarchical data structure. Each node in it has a label and zero or more resource records containing the information related to the node’s domain name. A domain namespace contains all possible top-level domain (TLD) names and is divided into logical parts we call zones.

A DNS zone may contain a single domain name or many domains and sub-domains. A zone has four levels:

  • Root – The root of the DNS system, represented by a “.” at the end of the domain name.
  • Top-Level Domain (TLD) – First level zone for each TLD, such as “.com”, “.org”, or “.edu”.
  • Domain – Second-level domains like baeldung are separate zones, managed by individuals or organizations.
  • Hostname – This is a freely selectable name for a host, “www“ is the conventional, but not a web server’s mandatory name.

If we combine the hierarchy levels from the hostname to the root, we’ll get a Fully Qualified Domain Name (FQDN). For instance:

Which is an authoritative source of information about each DNS domain name?

The above example shows a zone with multiple domains.

2.2. Authoritative Name Servers

Each domain must have one authoritative DNS server that publishes the information about the domain. An authoritative server for a zone is the name server that stores the IP addresses for the zone and holds the information about the zone’s domains in the text file known as the primary zone file.

For instance, when a browser tries to access www.baeldung.com, it gets the site’s IP address from the authoritative server for the baeldung.com zone, which holds the zone’s primary file.

3. Start of Authority (SOA)

A start of authority (SOA) is a DNS record with information about a zone. For example, the SOA record for baeldung.com looks like this:

Which is an authoritative source of information about each DNS domain name?

Let’s now analyze its structure.

3.1. Structure of SOA

A SOA record has the following fields:

Which is an authoritative source of information about each DNS domain name?

3.2. How to Find an SOA Record?

To find the authoritative name-server for a domain name, we first need to access the corresponding SOA record. To do so, we can use nslookup. It’s a command-line tool for querying Internet domain name servers.

For instance, if we want to find the SOA for google.com, we use the -type=soa switch of nslookup:

nslookup -type=soa google.com

Then, we receive a response specifying the primary name server and associated information:

Which is an authoritative source of information about each DNS domain name?

There, we see that the primary name server for google.com is ns1.google.com. The line Server: Unknown occurs when the is incorrectly configured for the DNS client.

The above result shows that the answer is non-authoritative, which means we received the response from a cache of a DNS server around the internet and not from the authoritative server of google.com.

To receive an authoritative answer, we need to send the query to the authoritative server of google.com.

4. Authoritative Answers

An authoritative answer is a response we get directly from the primary DNS server holding the master copy of the zone file.

To find the authoritative answer for google.com, we execute a new nslookup query in which we specify the primary name server as ns1.google.com:

nslookup google.com ns1.google.com

Upon executing the command, we’ll get the following response:

Which is an authoritative source of information about each DNS domain name?

It gives us the addresses of the authoritative server for the specified domain. The server’s IPv6 address is 2a00:1450:4019:805::200e, and the IPv4 address is 216.58.208.238.

5. Conclusion

In this article, we talked about DNS, and SOA, and showed how to get the authoritative name server for a domain using the nslookup tool.

The procedure is as follows. First, we get the name of the primary name server. Afterward, we use the primary server’s name to get the authoritative answer containing the authoritative name server’s IP address.

Authors Bottom

If you have a few years of experience in Computer Science or research, and you’re interested in sharing that experience with the community, have a look at our Contribution Guidelines.

What is authoritative name server in DNS?

An authoritative server is the authority for its zone. It queries and is queried by other name servers in the DNS. The data it receives in response from other name servers is cached. Authoritative servers are not authoritative for cached data.

What type of DNS server is authoritative for a specific domain?

The second type of DNS server holds a copy of the regional phone book that matches IP addresses with domain names. These are called authoritative DNS servers. Authoritative DNS nameservers are responsible for providing answers to recursive DNS nameservers about where specific websites can be found.

Who is authoritative for domain?

The authoritative DNS server is the final holder of the IP of the domain you are looking for. When you write a domain name in your browser, a DNS query is sent to your internet service provider (ISP). The ISP has a recursive server, which might have the needed information cached in its memory.

What DNS resource record is used to identify the DNS name server for a domain?

A nameserver (NS) record specifies the authoritative DNS server for a domain. In other words, the NS record helps point to where internet applications like a web browser can find the IP address for a domain name.