How does DNS works?

When you are browsing to, how does your machine know where to find the address of

It turns out that when you are going to, you are actually surfing towards the address 

The moment you type and hit enter, how is this domain name linked to that specific IP address.

1. Local Machine

Your local machine keeps a cache of some domain names and the IP addresses linked to it. Suppose the domain name is not in the cache. The request is now forwarded to your local dns resolver.

2. DNS resolver

Most internet providers (ISP) run DNS servers for their customers. These can act as a resolver to figure out the address. They also keep a cache of domain names and according IP addresses. Again, let’s assume the address that we are looking for is not in the cache. When the address is not found in the cache, the request is forwarded to a Root Name Server.

3. Root Name Server

It answers by returning a list of the authoritative name servers for the appropriate top-level domain (TLD) aka TLD servers. *

The Root Server does not know where to find However, it points you to a top level domain server for the .com domains.

4. TLD server

The top level domain server, again, does not know where to find But if you have a .com top level domain, it can forward you to the next place. the TLD server knows the address of the authoritative name server that knows all about So, it points you to this authoritative  name server.

5. Authoritative name server

This one knows all about and returns the ip address for the domain name.


End of the journey

Quit the journey to figure out where to find!

And it all happens in a fraction of a second.



* The number of  Root servers is limited to thirteen server addresses. However, by means of the anycast principle  such an address might lead to multiple destinations. So in reality, there are a lot more then thirteen destinations for the root servers.

** Root Name Servers, TLD servers and Authoritative Name servers are all categorised as DNS servers.

*** Each number in an IPV4 number before or after a dot is called an “octet” because it’s a base-10 equivalent of an 8-digit base-2 (binary) number used in routing network traffic. Eg.


Leave a Reply

Your email address will not be published.