How DNS Resolver Works (In My Words)
Whenever I type a website name like google.com in my browser, I used to think it directly opens the site. But actually, there is a small process happening behind the scenes called DNS resolving. Let me explain it in a simple way based on how I understand it.
First, when I enter the website name, my browser doesn’t know where that website is stored. Because computers don’t understand names like google.com, they only understand IP addresses.
So my browser starts by checking if it already knows the IP address. It looks into something called cache (stored memory). This can be:
Browser cache
System cache
If the IP address is already there, then the website opens quickly without doing anything else.
If the IP is not found, then the real DNS resolving process starts.
My request goes to something called a DNS resolver. Usually, this is provided by my internet service provider (ISP). The resolver’s job is to find the correct IP address for the website I asked.
Now the resolver doesn’t know the answer directly, so it asks other servers step by step:
First, it contacts the Root Server. This server doesn’t give the exact IP, but it tells where to find the next level.
Next, it goes to the Top-Level Domain (TLD) server. For example, if I typed .com, it goes to the .com server. This server again doesn’t give the full answer but points to the next server.
After that, the resolver contacts the Authoritative Name Server. This is the final place where the actual IP address of the website is stored. This server gives the correct IP address.
Now the resolver gets the IP and sends it back to my browser. Also, it stores this IP in cache for some time, so next time it will be faster.
Finally, my browser uses this IP address to connect to the server and load the website.
Even though this process involves multiple steps, it happens very fast, in just milliseconds. That’s why I feel like the website opens instantly.
This is how DNS resolving works whenever I search for any website on the internet.
Top comments (0)