Open In App

What happens when we type a URL

Improve
Improve
Like Article
Like
Save
Share
Report

URL stands for Uniform Resource Locator. URL is the address of the website which you can find in the address bar of your web browser. It is a reference to a resource on the internet, be it images, hypertext pages, audio/video files, etc.

Example :

https://practice.geeksforgeeks.org/ 

What is DNS :
DNS is short for Domain Name System. Like a phonebook, 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 IP address which is of the computer which hosts the server of the website requested.

Steps for what happens when we enter a URL :

  1. Browser checks cache for DNS entry to find the corresponding IP address of website.
    It looks for following cache. If not found in one, then continues checking to the next until found.

    • Browser Cache
    • Operating Systems Cache
    • Router Cache
    • ISP Cache
  2. If not found in cache, ISP’s (Internet Service Provider) DNS server initiates a DNS query to find IP address of server that hosts the domain name.
    The requests are sent using small data packets that contain information content of request and IP address it is destined for.
  3. Browser initiates a TCP (Transfer Control Protocol) connection with the server using synchronize(SYN) and acknowledge(ACK) messages.
  4. Browser sends an HTTP request to the web server. GET or POST request.
  5. Server on the host computer handles that request and sends back a response. It assembles a response in some format like JSON, XML and HTML.
  6. Server sends out an HTTP response along with the status of response.
  7. Browser displays HTML content
  8. Finally, Done.

Last Updated : 05 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads