Upgrade Your Career with Exciting Offers on our Career-defining Courses Upto 50% OFF | Offer ending in:
D H M S Grab Now

How DNS Server works?

Ever wondered how do computer systems communicate with each other? In the world of the internet, the computers distinguish each other with a unique number referred to as IP address. They do not understand the common language used by human beings. So, how do they communicate with human beings? When we enter a URL of any website in the search bar, that’s when DNS (Domain Name System) comes into the picture. It acts as a translator between humans and computers because computers understand IP addresses. It maintains a table where the domain names of the websites are mapped to their respective IP addresses. For example, When we type ‘Google.com’ in the web browser, DNS translates it to the language comprehended by the web browser, that is, the IP address, and conveys it to the web browser. Now, the web browser recognizes that we want to access google.com by the IP address to contact the respective server and connect us with the requested website.

DNS Servers:

DNS Servers operate collectively to render the IP address of the requested website to the web browser. The DNS Servers are of four types:

  • DNS Recursive Resolver/ DNS Resolver: DNS Resolvers are issued by the Internet Service Provider (ISP). It establishes a connection between the web browser of our system and the DNS name server.
  • Root Name Server: There are 13 sets of root name servers logically named as letter.root-servers.net where letter ranges from ‘a’ to ‘m’ – g (g is the home page address) and are operated by 12 different organizations. Each set has several servers placed around the world, and an informational page exists for all root name servers at letter.root-servers.org.
  • Top-Level Domain/ TLD name server: TLD name server stores the information of all domains sharing a common domain extension (.com, .in, .net, etc.).
    Example: .com TLD name server stores information of all the website having .com extension.
  • Authoritative name server: This is the last server in the Domain Name System. It stores the IP address of the requested website. You can find the Authoritative Name Server for a website by using this command:
    set query=ns,
    example.com (domain name)

How does DNS work?

When we enter the domain name in the web browser, the web browser requires the IP address to load the website, so it forwards the query to the computer’s OS. Operating systems are configured in such a way that they forward the query to the DNS Resolver. Operating System then reaches the DNS Resolver. The DNS Resolver reviews its cache to verify whether it has the IP address of the demanded website. If not, the DNS query is forwarded to the root name server. Root name server checks the extension of the website if its .com, .net, .org. The Root name Server presents the TLD name server’s IP address to the DNS Resolver based on the extension. DNS Resolver then communicates with the requested extension’s TLD name server, which then provides the Authoritative name server’s IP address, which should necessarily store the requested website’s IP address. Finally, the Authoritative name server provides the IP address of the demanded website to the DNS resolver. DNS Resolver stores this information in its cache for future use and provides the computer’s operating system’s IP address. Operating System then forwards it to the Web Browser. The Web Browser then contacts the server of the requested website and loads it.

Now the question arises on how TLD identifies which Authoritative server stores the requested website’s IP address? It all starts when we purchase a Domain name from a Registrar (any domain name provider). On Registrar’s website, we can set the Authoritative Name Server that the domain should use. We get the Authoritative name server’s details when we buy a web hosting plan from a hosting provider. Once the Authoritative name server details are entered in the Registrar’s website, they tell the TLD name server managing authority that is Registry to update the TLD name server with the details of the Authoritative name server that the user has provided. Now the TLD name server knows which Authoritative name server will provide the requested website’s IP address.

Is DNS necessary?

If we know the dedicated IP address of a website, we can access it by simply entering it in the web browser. In such a case, we can eliminate DNS as it will not play any role because we already know the website’s IP address. However, there is a large number of websites, so it becomes pretty difficult to remember the IP address of all the websites. So, the DNS server eliminates the need for humans to memorize each website’s complex IP address. The only thing we need to memorize is the domain name, which is easier to remember.

Devyani Bisht ( )
Content Writer
Devyani Bisht is a B.Tech graduate in Information Technology. She has 3.5 years of experience in the domain of Client Interaction. She really enjoys writing blogs and is a keen learner. She is currently working as a Technical Services Analyst with InfosecTrain.