DEV Community


Posted on

DNS resolution - How does it work basically?

The process of typing url to browser bar and then enter, wait for a little bit and you get your webpage in front of you seems like to be simple but there's a lot of communication and works between computers under the hood, and more amazingly, these complex stuffs are done in a time counted by just milliseconds!


When you type in the url, for example to browser and go, the browser first will ask the DNS resolver (usually your ISP) if he saved a cached IP address or not.

  • If he say yes, he will return the IP address to the browser and then the browser can go to that address to fetch assets of;
  • If not, he has to proceed on finding the url's IP address

That process of IP finding is called DNS resolution.

Find the IP address

Overall, the DNS resolver (now I will call it resolver) has to scope down the zone of searching: he will search for where is containing all the .com domains among others (.net, .co,...) first, then go to that .com domains container and search for's address and finally go to that final address to retrieve assets.

  1. The resolver asks the first information bar (rootname server) where contains all the .com domains, the RS returns the IP address of the .com container - this container's address is called Top Level Domain server.
  2. The resolver goes to the Top Level Domain server address, asking for the address of The TLD server returns the IP address where containing the domain - This address is called authoritative name server, the information bar knows where is living.
  3. The resolver go to the Authoritative name server, asking the exact address of, the ANS return the exact IP address of
  4. Having the final IP address of, the resolver saves that IP address for a limited time (cached), then tell the browser "hey, this is where lives, go here to find him".
  5. Browser go to that IP address and retrieve assets.

DNS resolution diagram

Next time when we want to access, the resolver will check if there's a time-valid cached IP address of or not, if the cached IP is not obsolete the resolver will return that cached IP to browser, or else it will start the DNS resolution process.

Some takes

  • DNS servers communicate with address in IPs type, not human url.
  • An IP address points to a specific computer containing the url's assets (HTML, CSS, JS files).
  • A certain url can have multiple IP address in ANS, each of these IP address is called A record. When requested, the ANS will choose 1 of these A records and return to resolver. By doing this the loads among servers containing assets of the url can be shared and balanced and avoid failures when one or more of the servers are down. For example: beside, the IP address of can be or We can go to one of them to get the same assets for


Top comments (0)