What is DNS used for?

What does DNS mean?

DNS is the short acronym for Domain Name System. It is an organized namespace that works upon a decentralized model. It helps with navigating queries and finding the host they are seeking for. It has to provide the answer (like A record, AAAA record) and also to be performed quickly. The Domain Name System appears to replace the HOSTS.txt file that held all hostnames. It was just not efficient enough. For its speed and scalability, the DNS is superior.

Thanks to the DNS service, domain names are accurately mapped to their IP addresses. It also serves to point services to host and verify many hosts and services.

The essential thing about DNS is its hierarchical structure. On the top of it is the root. The next level is TLD, then secondary domain name, and lastly, subdomain. Every level holds a piece of the complete information and points to the following level that holds another piece. So like that, piece by piece, the whole needed data is collected.

What is it used for?

  • It resolves domain names to IP addresses. 
  • The use of the Internet is more practical and fast.
  • Simply identifying and locating hosts on the Internet.
  • Simply identifying and locating services on the Internet.
  • Redundancy and load balancing.
  • Verifications of services, hosts, emails, etc.

What is DNS hierarchy?

The Domain Name System (DNS) is built on a hierarchical foundation. 

  • Root Level. In DNS, this is the highest level. Here can be found the root name servers. For resolving a particular domain name, they are the first step. They carry the entire list of top-level domains. The dot on the right illustrates the root level. For example, domain.com. 
  • Top Level Domain (TLD). This is the level after the root one, where the TLD server is placed (.com, .org., .net, .gov, .uk, .fr, .mx…). For example, domain.com. The TLD here is .com
  • Second Level Domain. At this DNS level, the segment usually refers to an organization. It is the one that registered the domain name through a domain name registrar. It is presented with “domain” in our example: domain.com. 
  • Subdomain. Here are extra elements of the domain name. They can be beneficial for navigating through the several website’s parts and organization. For example, help.domain.com.

The DNS query 

Your request for a domain will follow several steps, to the fact it has a tree-like structure.

Let’s say you make a DNS query for a specific domain. In our previous example domain.com., the first response is going to be from the root name server. This is the highest one on the hierarchy of DNS. The root server is going to observe your request and provide a reply with the only thing they know and the following level of the tree – the TLD. Every level has a particular role: reply to you for a piece until you receive the full answer. 

The following level responsible for the domain extensions, like .com, .net, etc., are the TLD name servers. They reply for the next part. In our example, the name servers responsible for TLD .com. They know where the domain is placed and direct you to its name server.

The domain’s name server will provide you with a simple answer with the IP address. So when you understand where the website is, you are able to access it.

Next time when you want to visit the same site, if it is not a lot of time, you will still have the address in your DNS cache. So your browser will skip the steps and open the website.

Recommended article: What is rDNS?