What happens when we type a URL?


What is a URL?

A web address, also known as a Uniform Resource Locator (URL), refers to a web resource that specifies both its location on a computer network and how to access it. It's a type of Uniform Resource Identifier (URI). URLs are most typically used to refer to web pages, but they can also be used for file transfer, email, database access, and a variety of other things. The URL was defined in 1994 by Tim Berners-Lee, inventor of the World-Wide Web.

A URL is composed of a protocol, a domain name, a path to the webpage and a name. URLs are used by Internet users who type or copy-paste them into the address bar of their web browser. Thus, you are effectively forwarded to that URL every time you click on a hyperlink inside an application (email, online page, word document).

It's difficult to recall the server's IP address. The domain name is the text version of the IP address, which is more human-friendly and simple to remember. It is a portion of the URL and is mainly used for the organization's branding.

Periods or dots are used to separate all sections of the domain name. The path specifies where a page, post, file, or other items can be found. It's commonly compared to the website's underlying file structure. After the hostname, the path is separated by a forward slash.

All URLs are presented in the following order −

  • Scheme name

  • Colon and two slashes

  • Location of the server

  • The port and location of the resource on the server

  • Fragment identifier

HTTP and HTTPS are the most widely used protocols.

What happens when we type a URL?

When we type a URL, the following actions are triggered

  • The browser checks caches for DNS entry to find the corresponding IP address of the website.

  • If the domain name is not discovered in the cache, the ISP (Internet Service Provider) DNS server performs a DNS query to determine the server's IP address that hosts the domain name.

  • Then, the browser initiates a TCP connection with the server using SYN and ACK messages.

  • The web server receives an HTTP request from the browser.

  • The server on the host computer processes the request and responds.

  • The server sends out an HTTP response with the response status.

  • The browser displays HTML material.

DNS is short for Domain Name System; it maintains and maps the name of the websites and particular IP address links to it. Every URL on the Internet has a unique IP address, which is the machine's address that runs the website's server. The fundamental goal of DNS is to provide user-friendly navigation. You can quickly access a website by entering its IP address into your browser.

Updated on: 17-Aug-2021

237 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements