How DNS works on browser surfing to Google.com

Let’s discuss how the Domain Name System (DNS) works when you use a browser to navigate the Google.com website.

  1. Typing the URL: When you enter “google.com” in the browser’s address bar and press enter, the browser first checks if the IP address corresponding to the domain name is present in its cache. If not, it proceeds to the next step.
  2. Operating System Resolver: In case the IP address is not cached in the browser, your operating system’s DNS resolver is queried for this information. If the required IP address is present in the operating system’s DNS cache, it is returned to the browser. Otherwise, the following steps are carried out.
  3. Recursive DNS Query: To find the IP address corresponding to the domain name, the system’s DNS resolver sends a recursive DNS query to the configured DNS server (usually provided by the ISP or a public DNS server like Google’s 8.8.8.8), which means the DNS resolver expects the server to provide the IP address.
  4. Root DNS Server: If the DNS server does not have the IP address cached, it begins the DNS lookup process by sending a non-recursive query to one of the Root DNS servers. The Root DNS server does not provide the IP address directly but instead provides a referral to the Top Level Domain (TLD) DNS server responsible for the .com TLD extension.
  5. Top Level Domain (TLD) DNS Server: The query is then forwarded to the TLD server for the .com domain, which in turn, provides a referral to the Authoritative DNS server responsible for managing the domain google.com.
  6. Authoritative DNS Server: Finally, the Authoritative DNS server is queried, and it returns the corresponding IP address of google.com (e.g., 172.217.7.4) to the DNS resolver.
  7. DNS Cache: Once the IP address is obtained, the DNS resolver caches the IP address for future use and passes it to the browser.
  8. Connecting to the Web Server: With the IP address in hand, the browser initiates a connection to the web server hosting the google.com website using HTTP or HTTPS protocols.
  9. Fetching the Webpage: Once the connection is established, the browser sends an HTTP request to fetch the webpage’s content. The server returns the web page’s content, allowing the browser to render and display the Google homepage on your screen.

In summary, DNS plays a critical role in translating human-friendly domain names such as google.com into an IP address that browsers can use to establish a connection and fetch content from the web server providing the website.



Posted

in

by

Tags: