How does DNS Works?

DNS (Domain Name System) is a hierarchical and decentralized system that is responsible for mapping human-readable domain names to IP addresses. When a user enters a domain name into their browser, the browser sends a request to a DNS server to resolve the domain name to an IP address.

Here’s how DNS works in a simplified manner:

  1. Domain Registration: When someone wants to create a website or online service, they register a domain name through a domain registrar. This domain name is the human-readable address that people will use to access the website.
  2. DNS Hierarchy: The DNS system is hierarchical, resembling an upside-down tree. At the top of this hierarchy are the root DNS servers, managed by a few organizations like ICANN. Below the root servers are the top-level domain (TLD) servers (.com, .org, .net, etc.), followed by authoritative name servers for individual domains.
  3. Resolving a Domain Name: When you enter a domain name in your web browser, your device needs to find out the corresponding IP address. It starts by asking a local DNS resolver (usually provided by your ISP or configured in your network settings).
  4. Caching: The local DNS resolver might have the IP address cached from previous queries. If not, it starts a process to find the IP address.
  5. Recursive Resolution: If the local resolver doesn’t have the IP address, it contacts one of the root DNS servers. The root server responds with a referral to the appropriate TLD server based on the top-level domain of the requested domain name.
  6. TLD Resolution: The TLD server, which knows which authoritative name server is responsible for the specific domain, responds with a referral to the authoritative name server.
  7. Authoritative Name Server: The authoritative name server for the domain holds the definitive record of the IP address associated with the domain name. It responds with the IP address back to the local DNS resolver.
  8. Caching the Result: The local DNS resolver caches the IP address for a certain period (TTL – Time To Live). This helps to speed up future queries for the same domain.
  9. Returning the Result: The local DNS resolver sends the IP address back to the user’s device.
  10. Accessing the Website: Armed with the IP address, your device can now contact the web server associated with the domain name, and the requested web page is delivered to your browser.

This process of resolving domain names to IP addresses happens quickly and transparently, allowing users to access websites and other online resources using human-readable domain names instead of IP addresses.


The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or other resources connected to the Internet or other networks. It associates human-readable names with machine-readable addresses, such as IP addresses.

Here is how DNS works step by step:

  1. A user types a domain name, such as www.google.com, into their web browser.
  2. The web browser sends a request to a DNS resolver, which is a server that translates domain names into IP addresses.
  3. The DNS resolver queries the root nameservers, which are the top-level servers in the DNS hierarchy.
  4. The root nameservers return the addresses of the TLD (top-level domain) nameservers for the domain’s top-level domain, such as .com.
  5. The DNS resolver queries the TLD nameservers for the address of the domain’s authoritative nameservers.
  6. The authoritative nameservers return the IP address of the website.
  7. The DNS resolver returns the IP address to the web browser, which then connects to the website.
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
5 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Dharmendra kumar
Dharmendra kumar
8 months ago

Thank you for simplifying DNS intricacies in your blog. Your efforts have made understanding its functionality a breeze!

Vijay K
Vijay K
8 months ago

This was really helpful. We love your style of explaining stuff. 

Roshan Jha
Roshan Jha
8 months ago

Full of knowledge… Nice blog !!!! The diagram was very helpful in visualizing how the DNS system works.

Anil
Anil
8 months ago

Directlyeasy, and to the factorthanks a lot! Iā€™m a career switcher and needed a simple rationalization.

Amit Kumar
Amit Kumar
8 months ago

This is a wonderful explanation of the internet servers and how DNS works šŸ™‚

5
0
Would love your thoughts, please comment.x
()
x