Skip to content

What happens when you type a URL in the browser ?

You type a URL in your browser and press Enter,

  • First of all, the browser looks up an IP address for the domain. For example, if you search www.google.com which is the domain name of the Google Search website, then your browser will query the IP address of that domain. Usually, these DNS records are cached by the browser, operating system, or router but if there is no DNS record found locally, the browser will perform a DNS lookup with the DNS server. Once the browser gets the DNS record with the IP address, then it will initiate a TCP connection with the server.

  • That means in the second step, the Browser initiates a TCP connection with the server by following the three-way handshake model.

  • Once, the TCP connection is established between the browser and the server, then the browser sends the HTTP request to the server.

  • The Server processes the request and sends back the HTTP response.

  • After getting the HTTP response, the browser renders the content over the screen.