What happens when I type URL in address bar

Sarveshlal
3 min readDec 2, 2020

Address bar

In a web browser, the address bar (also location bar or URL bar) is a GUI widget that shows the current URL. The user can type a URL into the bar to navigate to a chosen website. The user can edit the text to navigate to a new location. For instance, clicking the mouse in the address bar allows you to change the address or delete it and enter a new one. The address should be a URL, such as www.example.com.

What is IP address?

An Internet Protocol address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.

IP address versions : IPV4 and IPV6

IPv4 is the older version which has an space of over 4 billion IP addresses. However, the new IPv6 version can provide up to trillions of IP addresses to fulfill the need of all internet users and devices.

  • Example for IPV4: 192.168.1.1
  • Example for IVP6: 4ggr:1925:5656:7:600:t4tt:tc54:98vt

Static IP address : The IP address does not change when a device is assigned a static IP address.

Dynamic IP address : A dynamic IP address is one that changes from time to time and isn’t always the same.

What is DNS?

DNS is short for Domain Name System. Like a phone book, DNS maintains and maps the name of the website, i.e. URL, and particular IP address it links to. Every URL on the internet has a unique and static IP address which is of the computer which hosts the server of the website requested.

What happens when I type URL in address bar

  1. Browser checks cache to find the corresponding IP address of website.If not found in one, then continues checking Browser Cache, Operating Systems Cache, Router Cache, ISP Cache.
  2. If 4 levels crossed , no results found, then request sends to top or Root server of the DNS hierarchy. It tells from where this information you can get. If you are searching IP address of the top level domain(.com,.net,.gov,. org). It tells the resolver server to search TLD server (Top level domain).
  3. Now, resolver asks TLD server to give IP address of the domain name. TLD stores address information of domain name and tells the resolver to ask it to Authoritative Name server.
  4. The authoritative name server is responsible for knowing everything about the domain name. Finally, resolver (ISP) gets the IP address associated with the domain name.

After getting an IP address, resolver stores it in its cache so that next time. It can now provide IP address from their cache.

DNS Resolver

TCP connection

Once the IP address of the computer is found, it initiates connection with it. To communicate over the network, internet protocol is followed. TCP/IP is most common protocol. A connection is built between two using a process called TCP 3-way handshake.

1. A client computer sends a SYN message means, whether second computer is open for new connection or not.

2. Then another computer, if open for new connection, it sends acknowledge message with SYN message as well.

3. After this, first computer receives its message and acknowledge by sending an ACK message.

TCP - Three Way Handshake Protocol

Conclusion

Finally, the connection is built between client and server. Now, they both can communicate with each other and share information. After successful connection, browser (client) sends a request to a server that I want this content. The server knows everything of what response it should send for every request. Hence, the server responds back.

--

--