DEV Community

Jarvish John
Jarvish John

Posted on

How the DNS is resolved ?

USER MAKING A REQUEST:
when a user searches for something using the domain name , the browser needs to know the IP of the domain to establish communication so it resolves the DNS.

How it fetches the IP through the DNS?

Before starting, let's be clear about what DNS is. DNS is like a label that maps a domain name to an IP address.

Let’s say we are searching for "WIKIPEDIA".

First, the machine checks within itself (browser/cache) asking, "Do you remember the IP of Wikipedia?" If it doesn’t find it there, the request is forwarded to the router/modem. If it still doesn’t know, it is sent to the resolver (Internet Service Provider).

If the resolver also doesn’t have it cached, it queries the Root Name Server. From there, it is directed to the appropriate Top-Level Domain (TLD) server like .com, .in, or .org. Then it reaches the authoritative name server, where it finds Wikipedia’s IP from the zone file.

Finally, the IP address is returned back to the user.

Top comments (0)