Everything You Need To Know About Tech

What is DNS? Introduction to the Domain Name System

0 60

If you have ever dealt with the Internet and computer networks, you probably heard about the domain name system (DNS). After reading the article find out how it all works.

The hostname itself will not give any information about finding the particular machine with which you are going to contact since all connections are by IP addresses.

A domain name server is a device that maps the host name to the IP address of a specific machine / hardware.

This article will cover the details of various DNS queries, types of DNS servers, and variations on DNS records.

DNS resolver

These are the computers that providers use to search in their database for a specific node requested by the user. When data is received, the user is redirected to the appropriate IP address. Resolvers play a crucial role in the DNS.

DNS resolver caches information. For example, the site example.comis located on a machine with an IP address Therefore, resolver caches from all over the world will contain the following correspondence:→

It is believed that in the future the site may move to any other host with a different IP, say Caches DNS resolvers around the world for some time will keep the same IP address. This may result in the site being inaccessible until the changes reach all DNS.

The time during which the recording is stored in the resolver is called TTL (time to live).

It can be installed in the service control panel on which the domain was purchased.

Types of DNS servers

Root DNS Server

This is a DNS server that stores the addresses of all TLD servers (TLD – top-level domain). On the way from the hostname to the IP address, the request first goes to the root DNS server.

There are 13 root DNS servers:

Organizations that manage root DNS servers
Organizations that manage root DNS servers

This does not mean that there are only 13 machines that process all requests from all over the world – there are also secondary servers to which traffic is distributed.

Related Posts
1 of 26

TLD servers

These servers are linked to top level domains (TLDs). Usually they go after root DNS servers. TLD servers contain information about the top-level domain of a particular host.

Say, if you request the IP address of a host, the TLD server that matches the domain will be polled .com. The TLD server returns the address of the authoritative DNS server for the resolver.

Now the question arises – how do TLD servers know the address of authoritative servers? The answer is simple – after you buy any domain from a registrar like Godaddy or Namecheap, registrars link authoritative servers to the TLD server.

Now some providers provide the ability to use third-party authoritative servers. You can choose a specific authoritative name server from the registrar.

Authoritative DNS server

The request for these servers comes in the last turn. These servers store actual records of type A, NS, CNAME, TXT, and so on.

Authoritative DNS servers, if possible, return the IP addresses of the hosts. If the server cannot do this, it gives an error and the search for the IP address by servers ends there.

Types of DNS queries

There are 3 types of DNS queries:

  1. Recursive : similar requests are performed by users to the resolver. Actually, this is the first query that is executed during the DNS lookup. As a resolver, most often is your Internet provider or network administrator.
  2. Non-recursive : in non-recursive requests, the resolver returns the answer immediately without any additional requests to other name servers. This happens if the necessary IP address is cached in the local DNS server, or if requests are sent directly to authoritative servers, thus avoiding recursive requests.
  3. Iterative : iterative queries are executed when the resolver cannot return an answer because it is not cached. Therefore, it performs a query to the root DNS server. And he already knows where to find the actual TLD server.

For example, if you are trying to get the IP address of, then the root domain server will output the TLD server address for .com. This address will be returned by the root server to the resolver. After that the resolver will poll the TLD server. The TLD server may not know the desired IP address, but it may give the address of the authoritative DNS server for

Let’s try to consider this process in the figure:

Let’s sort the picture above:

  1. The user makes a request to the resolver to find the IP address. This is a recursive query.
  2. Resolver, if possible, scans its cache for the required IP address.
  3. If the resolver has the required IP address, then it returns it.
  4. Otherwise, the resolver performs an iterative query to the root DNS server. The root DNS server searches for the required TLD for the requested address. For example, if the host is, then the TLD is .com. The root DNS server finds the address of the .com domain and returns a response to the resolver.
  5. Now the resolver performs an iterative query to the TLD server to get the required IP address. The TLD server returns the address of the authoritative server for the requested host.
  6. The authoritative server stores the actual host name matching records with the IP address that is returned to the resolver (which, in turn, returns it to the user).
  7. If the required entry does not exist on the authoritative server, then the error ” DNS_PROBE_FINISHED_NXDOMAIN” is returned .
  8. For all servers through which the request passes, the result is cached, and in case of a second request, the result will already be on the server.
  9. On average, DNS lookups take about 4 queries, but the search will take only a few milliseconds.

What is the result?

Even if you change the record with registrars, making changes on resolvers around the world will take some time. This process can last from 24 to 72 hours, but it usually completes faster, since during this time the TTL-recording at providers has time to expire.


This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More