Domain Name System (DNS)

The Domain Name System (DNS) is a distributed database system that translates domain names to numerical Internet Protocol (IP) addresses. It is an essential part of Internet infrastructure.

In the early days, only a small number of computers were connected to the Internet and a file was maintained with computer names and their IP addresses. But even with a small number of computers, names were easier to memorize than IP addresses. This file was available at a central location and could be copied by other system administrators.

The success of the Internet and the growing number of connected computers made it difficult to keep this file up to date. The solution was to create a distributed system for domain name and IP address resolution. 

DNS names and hierarchies

The Domain Name System has a hierarchical structure where each site is only responsible for updating the information for its own domain. This is why it is considered a distributed system.

In this hierarchy, each part of the name —in other words, each domain— is separated by a period (.). The hierarchy of domains descends from right to left, and the leftmost part of a name is the most specific. For example, in, the name that appears most to the left (example) represents a server (generally a web server) and is the most specific part of the domain name, which, in turn, is included in the org domain (the least specific part of that name).

Different organizations may be responsible for different parts of a domain name. In other words, the organization responsible for the org zone is not necessarily responsible for the example zone.

The three components of the DNS

The DNS has three components: authoritative servers, recursive servers, and clients (resolvers).

A client (resolver) is installed in any computer with TCP/IP software. Generally speaking, a client is any computer with Internet access capability.

How does it work?

The client software initiates a DNS resolution (in response to a request by another software running on the computer) to access another computer using its name. Configuring a resolver is easy and all that it requires is the IP address of a recursive server.

The recursive server receives DNS queries from the resolvers and is responsible for executing all the resolution steps needed to provide the final answer to the client (resolver). Recursive servers query multiple servers until they obtain the answer to the query.

Finally, the authoritative server has authority over a given domain name. In other words, it is the trusted source of information for the domain name. It contains the information on which IP addresses are associated with the computers using the domain name in question.

A domain name resolution is initiated by the client software, which sends the query to a recursive server. This other server generally initiates the resolution by querying the root servers, which are responsible for the highest level of the domain name hierarchy.

Based on the information received from the root servers, the recursive server queries other servers until it reaches the server responsible for the desired domain name.