Domain Name System (DNS) converts the domain name to the corresponding IP address. Every website has an IP address that is used by a device to connect with it. Computers use IP addresses to communicate with one another. We humans, on the other hand, are not so good at remembering numbers, so we use domain names.
DNS maintains a massive database of the IP addresses. When a user searches for a website, the DNS looks in the database, locates the correct IP address and then routes it to the user’s browser. Through this process, known as DNS name resolution, the web browser opens the desired website.
Hierarchy of DNS
DNS works on the following three levels:
DNS root servers
They are the highest among the DNS hierarchy. DNS root servers are 13 sets of servers that are present all over the globe managed by 12 organisations. Root servers provide information about the top-level domain (TLD) servers to the DNS resolver when the later aks for it.
DNS TLD servers
These are the next in DNS hierarchy. A top-level is the section of the web address after the dot. For example, www.google.com has the TLD as ‘com’. Similarly, www.candid.technology has ‘technology’ as the TLD. TLDs are usually of two types–geographical nad organisational.
Geographical TLDs correspond to the location such as ‘.uk’ (United Kingdom) or ‘.in’ (India).
Example of organisational TLDs are–.com (commercial organisations), .edu (educational institutions), .mil (military), .org (non-profit organisations), .int (international organisations), among others.
They act as a link between the user and the Internet DNS infrastructure. They are the first to receive the request from the user. A DNS resolver can store the IP address of the website in its cache for further use. Internet service providers (ISPs) usually maintain DNS resolver.
Now that we have understood the hierarchy let us look at hoe the DNS works.
How a DNS works?
When a user types the website address, there are a string of processes that occur. The processes are as follows:
- When a user searches for a website, the web browser searches it in the browser cache. If the IP address is not found, the internet query then travels to the DNS resolver server.
- DNS resolver then searches its cache for the IP address. If the address is found, then the web page will open on the user’s computer. If not, then the resolver sends the query to the root servers.
- The root servers, in response to the query request by the resolver, sends the address of the TLD server to the resolver. For instance, the query is about ‘.technology’ TLD, then the request is forwarded to the .technology TLD.
- After that, the resolver requests the TLD server for query resolution. TLD directs the resolver to the authoritative name servers’ IP address.
- After receiving the name server’s address, the resolver then requests the name server for the IP address of the website.
- The name server then responds with the exact IP address of the website to the resolver.
- After collecting the requisite information, the resolver returns to the web browser with the correct IP address.
- The web browser then can retrieve the webpage by sending the HTTP request to the IP address
Former Senior Editor at Candid.Technology. Hemant has a keen interest in social issues and international relations.