![]() |
VOOZH | about |
Domain Name System (DNS) is an important part of how the internet function. It translates human-readable domain names (like www.google.com) into machine-readable IP addresses (like 192.0.2.1) that computers use to communicate with each other. Let’s dive into the detailed steps of how DNS works.
When we type a domain name like https://www.geeksforgeeks.org/ into our browser, our computer starts the process of finding the corresponding IP address needed to connect to the website.
The first place our system looks is in its local cache, which may include:
If the IP address is found in any of these caches, the process ends here and the browser connects to the website. Otherwise, the process moves forward.
If the IP address is not in the local cache, the system may check host files, which are manually configured mappings of domain names to IP addresses. This is rare in modern systems, but it might still be used for certain network configurations.
If no IP address is found locally, the request is sent to a DNS Resolver. The Resolver is a server provided by our Internet Service Provider (ISP) or a public DNS service like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1). The Resolver acts as the intermediary that communicates with various DNS servers to find the IP address.
Resolver first contacts the Root DNS Server which is the starting point for DNS lookups. The Root server doesn’t know the exact IP address of geeksforgeeks.org but directs the query to the Top-Level Domain (TLD) Server responsible for .org.
Resolver sends the query to the TLD Server for .org domains. The TLD server handles domain names ending in .org and knows where to find the authoritative nameserver for geeksforgeeks.org.
The Resolver then queries the authoritative nameserver for geeksforgeeks.org. This server is responsible for storing DNS records for the domain, including the mapping of the domain name to its IP address.
Authoritative nameserver responds to the Resolver with the exact IP address (e.g., 192.0.2.1) for geeksforgeeks.org.
Resolver receives the IP address from the authoritative nameserver and sends it back to our computer. At this point, our computer knows how to connect to the website.
With the IP address in hand, our browser sends a request to the real server that hosts geeksforgeeks.org. This server processes the request and sends the necessary data back to our browser.
Our browser receives the response from the real server and the website content is displayed on our screen. All of this happens in just milliseconds, making the process seamless for the user.
The three DNS zones are:
- Zone Authority : The authoritative server for a domain.
- Reverse Lookup Zone: Resolves IP addresses back to domain names.
- Forward Lookup Zone : Resolves domain names to IP addresses.
The two main functions of DNS are:
- Name Resolution : Converts human-readable domain names into IP addresses.
- Routing : Ensures that internet traffic reaches the correct destination based on the domain name.
Domains are used to identify and access websites on the internet. When a user enters a domain name, DNS servers resolve it to an IP address which then directs the user to the corresponding website.