What happens when you type [URL] in your browser and press ENTER

zitouni mehdi
6 min readApr 25, 2021

So in this article I will explain the differents steps occured when you type url for example https://www.holbertonschool.com on your browser an press a physical button ENTER.

I think that the whole internet run on suite TCP/IP protocol, to transmit Data between webserver and browser (client), so you type your uniform resource locater [https://www.holbertonschool.com], in other words this string of url contain differents field like https: protocol, www.holbertonschool: domaine name, path like ( /index.html)to display web page contain in index.html file from server. when you type enter on keyboard this Domain Name has to turn in IP Adresse it will be cached behind the domain name( you can see in details for how to do that below).

IP Address for www.holberton school.com
IP Address for www.holbertonschool.com

DNS is a domaine name server is looks like a yellow pages they maintain tables of this differents name domaine and the actual IP Addresses

DNS lookup example

so we can take into acount these differents steps occured after parsing URL

DNS request

TCP/IP

Firewall

HTTPS/SSL

Load-balancer

Web server

Application server

Database

Step 1: DNS LOOKUP:

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like holberton.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources. you can see this link of how DNS is work .

1-A user types ‘example.com’ into a web browser and the query travels into the Internet and is received by a DNS recursive resolver.

2-The resolver then queries a DNS root nameserver (.).

3-The root server then responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains. When searching for example.com, our request is pointed toward the .com TLD.

4-The resolver then makes a request to the .com TLD.

5-The TLD server then responds with the IP address of the domain’s nameserver, example.com.

6-Lastly, the recursive resolver sends a query to the domain’s nameserver.

7-The IP address for example.com is then returned to the resolver from the nameserver.

8-The DNS resolver then responds to the web browser with the IP address of the domain requested initially.

9-The browser makes a HTTP request to the IP address.

10-The server at that IP returns the webpage to be rendered in the browser.

Complete DNS lookup and web page query

Step 2: TCP/IP:

after we find the IP Address correspond to our domaine name we can connect on the target server who contain differnts files which build the site. to ensure communication between client and server we refer onTCP/IP model.

TCP/IP: Le protocole TCP/IP (Transmission Control Protocol/Internet Protocol) combines the two protocols TCP and IP. It is therefore a suite of protocols associated with the Internet domain for which it facilitates data transfer. see TCP/IP

Step 3 SSL /HTTPS:

SSL/TLS certificates work by digitally tying a cryptographic key to a company’s identifying information. This allows them to encrypt data transfers in such a way that they can’t be unscrambled by third parties.

SSL/TLS works by having both a private and a public key, as well as session keys for every unique secure session. When a visitor enters an SSL-secured address into their web browser or navigates through to a secure page, the browser and the web server make a connection.

When you set up an SSL certificate, you configure it to transmit data using HTTPS. The two technologies go hand in hand and you can’t use one without the other. see more.

Step 4 loadbalancer :

Assuming the website we are visiting handles a large volume of requests each day, the host server will have a load balancer to effectively distribute the traffic. The load balancer server utilizes some type of balancing algorithm to distribute traffic to the different web serves. This ensures that resources are being used as efficiently and no one server becomes overloaded and crashes. see more

Step 6 FireWall :

Depending on the design of the system, at this point a firewall could be present to check and restrict incoming and outgoing traffic to prevent unwanted connections. Firewalls can be either hardware or software and typically monitor specific ports for incoming traffic. Traditionally HTTP traffic is port 80 and HTTPS traffic is port 443

step 7 Web Server, Application Server and Database:

Web server

Having a arrived at the web server, the host can the determine what to send back to the user depending on the HTTP request . Depending on what the user is trying to do (filling out a form, logging in, deleting a post, or opening a specific), a specific method will be seen in the HTTP request. An HTTP response is sent back to the user specifying if the request was successful that your browser can parse and display to the user. Depending on the request, our web server may need to send the request to the application server, before generating the content to send back to the user. Anything that is not static content (other than html text) is considered dyanmic (pushing button, etc.) and will be sent to the application server.

Application server

If an application server receives a request, it will run the dynamic content and translate it into HTML content that is then sent back to the web server to be sent to the user’s browser. Typically dynamic content is in Javascript or similar language to handle the requests.

If the request involves some type of data that needs to saved or retrieved (signing up for something, continuing an application, etc.) then the request will be sent on the database server.

Database

The database server functions as its name implies. The data is typically stored using some type of application such as MySQL or MongoDB that provide the ability to query user information quickly and efficiently. Once data is retrieved or stored it is sent back to the application server to be handled before being sent back to the web server.

At this point, the all of the content is sent back to the user. While reading all of these steps took a few minutes, these steps take fractions of a second to happen and deliver back to the user.

--

--