What happens when you type a URL

Swaminathan Rammohan
2 min readDec 3, 2020

URL is nothing but the Uniform Resource Locator that is the address of the website, which we enter in the address bar(guvi.in). On the other hand, the DNS (Domain Name System) is the database that links the URL with a particular IP address. The IP address comes from the computer server that hosts the website’s server. So, we request access to a website by typing the URL, and DNS maps the URL to the IP address we are requesting.

URLs make our life simpler by mapping the IP address with the name of the website (209.85.227.104), and we know that remembering the IP of each and every website is not possible.

So, the browser first checks for cache to get the DNS record

  1. Our browser will maintain a repository of DNS records for a limited time that we have visited before.
  2. The browser then will check for OS cache (OS maintains the DNS records too)
  3. The next step is to search the router cache (when the DNS record is not available in the OS cache)
  4. The final hope is the ISP (Internet Service Provider) cache. The cache is maintained at various levels which may not be ideal for your data privacy but helps in regulating traffic and hasten the transfer of data.
  5. When the ISP cache is not available too, then the DNS server initiates a DNS query to find the IP address of the server that hosts the website we are looking for and this DNA query searches different DNS servers on the internet till it finds the correct IP (recursive search). The requests are sent through small packets of data. An optimization for the fastest routing is done. We will get an error if the packets get lost.
  6. TCP connection with the server is initiated by the browser and then a TCP connection is established.
  7. HTTP request to the webserver is made by the browser
  8. The server will send the response
Processing the URL

--

--