Skip to main content

How DNS Resolution Works

Published 2 min readMarkdown
Part of seriesAssignments

When we hit a request to a website, several operations are performed within a fraction of second. In this article, we are going to see how a browser handles the request specifically.

So when the browser receives a request, the request is handed over to a structure called as Recursive DNS resolver. This DNS resolver processes the request with the DNS servers and system, and provide us a IP at the end. Now let’s discuss about the DNS system broadly.

DNS

DNS stands for Domain Name System. In simple terms, it is the phone-book of the internet. It processes the human readable language into the IPs of different website.

It is because we humans are not capable of remembering thousands of random combination of numbers, rather we humans are better are remembering names.

Mainly, there are 13 DNS root servers all over the world.

If we move further, it is seen that, the DNS doesn’t provide us the IP directly, rather it gives us a address and tells us to move ahead. It can be represented in such a way that: “DNS tells us whom we should talk next”. The address it gives us is called as the: TLD(Top Level Domain)

TLD(Top Level Domain): A Top-Level Domain (TLD) is the final segment of a domain name, located after the last dot. Example: ‘.com', '.org'

Then the TLD gives us another address to where we should head to called as the authoritative DNS servers.

Authoritative DNS servers: These servers contain all the information regarding the DNS servers, which means this is the place where we will be finding the IP of the website we are looking for.

Now this IP is returned to the recursive DNS resolver, and the resolver handles that IP to the browser.

he Complete Journey of a Web Request: DNS, TCP, HTTPS | Medium

Dig command

Dig stands for: Domain Information Groper

It’s a simple command used by developers to get information about the DNS servers on the terminal. The dig command’s variations can be also used to point out some issues(if there) of the DNS.

Some of the basic dig commands are:

dig . NS : It lists all the 13 DNS root servers.

dig com NS : It gives us all the authoritative servers that have the TLDs as “.com”

dig google.com NS : It gives us all the authoritative server names regarding to “google.com”

dig google.com : This command by default returns the IP of that domain, if no other records are specified.

No comments yet. Be the first to comment.

More from this blog