The internals of the internet: how does the Internet works

Have you ever wondered what happens when you type google.com in your browser?

Well, we will get into it, but before that let’s take a real-life scenario.

Suppose you want to visit your friend’s house, but your only information is the name of the house he lives in, say “xyz villa”. Can you reach his house with this information? Obviously not. You will need more information like the exact address, pincode etc.

Similarly, when a user types www.google.com on the browser, the browser needs to know the address of google.com so that he can redirect the user to the website. This address is called IP address. An IP address is a unique identifier assigned to devices on a network.

So when a user types google.com in the browser, it first makes a request to a special type of server called DNS or Domain Name System Server. It’s like a phonebook or database that contains website or domain names with their corresponding IP addresses. On receiving the request from browser, it returns it the IP of google.com and hence the browser will redirect the user to the search engine.

So in brief, whenever the user types an address on the address bar of their browser, the request initially goes to the DNS server to get the IP address of the URL. This is known as DNS resolution.

What is DNS Resolution?

Suppose the client/browser makes a request to a DNS server as “abc.com. Now the DNS server in turn makes a request to a root server.

A root server is a critical component of the Domain Name System (DNS) hierarchy, responsible for directing DNS queries to the appropriate Top-Level Domain (TLD) name servers.

In the world, there are 13 logical root servers, but they are distributed across the globe using a technology called anycast. This ensures that queries are routed to the nearest available root server for efficiency. The role of the root server is to direct the DNS server to the appropriate Top-Level Domain (TLD) name server, such as .com or .uk etc. These TLD name servers then provide information about the authoritative name server responsible for the specific domain."

The root server will first respond with the IP address of the ".com" top-level domain (TLD) when queried for the "abc.com" domain. Upon receiving the IP address for the ".com" TLD, the DNS server will then make a request directly to the ".com" TLD server. This server will, in turn, return the IP address of the authoritative name server for the domain. For example, if the user purchased the domain "abc.com" from providers like GoDaddy or Cloudflare, the ".com" TLD server will respond with the IP address of the authoritative name server associated with the domain, which is responsible for managing its DNS records.

“An authoritative name server is a critical component of the Domain Name System (DNS) that provides definitive answers to DNS queries about a specific domain”

Now again a request from DNS server will go to ANS (ex. godaddy), which will return the IP address of abc.com to the DNS server and it will return it back to the user.

This whole process is called DNS resolution.

#chaicode #dns #internet

0
Subscribe to my newsletter

Read articles from Koustav Chatterjee directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Koustav Chatterjee
Koustav Chatterjee

I am a developer from India with a passion for exploring tech, and have a keen interest on reading books.