What happens when you type holbertonschool.com in your browser and press Enter

Othmaniamir
10 min readSep 6, 2021

1. You type holbertoschool.com into the address bar of your browser.

2. The DNS resolves domain names to IP adresses.

The DNS proccess step by step

in the world of networking, computers don’t go by names like humans do, they go by numbers, because that’s how computers and other divices talk and identify with each other over a network, which is by using numbers as IP adresses. Humans on the other hand are accustomed to using names instead of numbers. Whether is talking directly to another person or identifying a country, place or thing, humans identify with names instead of numbers. So in order to bridge the communication gap between computers and humans and make the communication of a lot easier, networking engineers developed DNS, and DNS stand for domain name system. And DNS resolves names to numbers to be more specific it resolves domain names to IP adresses. So if you type in web address in your web browser, DNS resolve the name to a number because the only thing computers know are numbers. So for exemple if you wanted to go to a certain website you would open up your web browser and type in the domain name of that website, so for exemple let’s use holbertonschool.com. Now technically you really don’t have to type in holbertonschool.com to retrieve the Holbertonschool web page, you can just type in the IP address istead if you already knew what the IP address was, but since we are not accustomed to memorizing and dealing with numbers, especially when there are millions of websites on the interne, we can just type in the domain name instead and let DNS convert it to IP address for us. So back to our exemple, when you type in holbertonschool.com your web browser the DNS server with search through its database to find a matching IP address for that domain name, and when it finds it it will resolve that domain name to the Ip address of the Holbertonschool web site, and once that is done then your computer is able to communicate with Holbertonschoolweb server and retrieve the web page.

So DNS basically works like a phone book, you don’t look up the number first, you look up the name first, then it will give you the number. So to break this down into further detail let’s examine the steps that DNS takes.

So when you type holbertonschool.com in your web browser and if your web browser or operating system can’t find the IP address in its own cach memory, it will send the query to the next level to what is called the resolver server.

The resolver server is basically your ISP or internet service provider, so when the resolver receives the query, it will check its own cache memory to find an IP address for holbertonschool.com, and if it can’t find it it will send query to the next level which is the root server.

The root servers are the top or the root of DNS hierarchy. There are 13 sets of these root servers and they are strategically placed around the world, and they operated by 12 different organizations and each set of these root servers has their own unique IP address. So when the root server receives the query for the IP address for holbertonschool.com the root server is not going to know what the IP address is, but the root server know where to send the resolver to help it find the IP address.

So the root server will direct the resolver to th TLD or top level domain server for the dot com domain. So the resolver will now ask the TLD server for the IP address for holbertonschool.com. The top level domain server stores the address information for a top level domains, such as .com, .net, .org and so on. This particular TLD server manages the dot com domain which holbertonschool.com is a part of.So when a TLD server receives the query for the IP address for holbertonschool.com, the TLD server is not going to know what is IP address foryahoo.com.

So the TLD will direct the resolver to the next and final level, which are the authoritative name servers. So once again the resolver will now ask the authoritative name server for the IP address for holbertonschool.com. The authoritative name server or servers are responsible for knowing everything about the domain which include the IP address. They are final authority. So when the authoritative name server receives the query from the resolver, the name server will respond with the IP address for holbertonschool.com. And finally the resolver will tell your computer the IP address for holbertonschool.com and then your computer can now retrieve the Holbertonschoolweb page. It’s important to note that once the resolver reseives the IP address, it will store it in its cache memory in case it receives another query for holbertonschool.com so it doesn’t have to go through all those steps agin.

These packets travel through multiple networking equipment between the client and the server before it reaches the correct DNS server. This equipment use routing tables to figure out which way is the fastest possible way for the packet to reach its’ destination. If these packets get lost, you’ll get a request failed error. Otherwise, they will reach the correct DNS server, grab the correct IP address, and come back to your browser.

3. The browser initiates a TCP connection with the server.

what is load balancer and Firewall:

  • In computing, load balancing refers to the process of distributing a set of tasks over a set of resources, with the aim of making their overall processing more efficient. Load balancing can optimize the response time and avoid unevenly overloading some compute nodes while other compute nodes are left idle.
  • In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted network and an untrusted network, such as the Internet.

Once the browser receives the correct IP address, it will build a connection with the server that matches the IP address to transfer information. Browsers use internet protocols to build such connections. There are several different internet protocols that can be used, but TCP is the most common protocol used for many types of HTTPS requests.

To transfer data packets between your computer(client) and the server, it is important to have a TCP connection established. This connection is established using a process called the TCP/IP three-way handshake. This is a three-step process where the client and the server exchange SYN(synchronize) and ACK(acknowledge) messages to establish a connection.

1. The client machine sends a SYN packet to the server over the internet, asking if it is open for new connections.

2. If the server has open ports that can accept and initiate new connections, it’ll respond with an ACKnowledgment of the SYN packet using a SYN/ACK packet.

3. The client will receive the SYN/ACK packet from the server and will acknowledge it by sending an ACK packet.

Then a TCP connection is established for data transmission!

To transfer data packets between your computer(client) and the server, it is important to have a TCP connection established. This connection is established using a process called the TCP/IP three-way handshake. This is a three-step process where the client and the server exchange SYN(synchronize) and ACK(acknowledge) messages to establish a connection.

1. The client machine sends a SYN packet to the server over the internet, asking if it is open for new connections.

2. If the server has open ports that can accept and initiate new connections, it’ll respond with an ACKnowledgment of the SYN packet using a SYN/ACK packet.

3. The client will receive the SYN/ACK packet from the server and will acknowledge it by sending an ACK packet.

Then a TCP connection is established for data transmission!

To transfer data packets between your computer(client) and the server, it is important to have a TCP connection established. This connection is established using a process called the TCP/IP three-way handshake. This is a three-step process where the client and the server exchange SYN(synchronize) and ACK(acknowledge) messages to establish a connection.

1. The client machine sends a SYN packet to the server over the internet, asking if it is open for new connections.

2. If the server has open ports that can accept and initiate new connections, it’ll respond with an ACKnowledgment of the SYN packet using a SYN/ACK packet.

3. The client will receive the SYN/ACK packet from the server and will acknowledge it by sending an ACK packet.

Then a TCP connection is established for data transmission!

4. The browser sends an HTTPS request to the webserver.

what is HTTPS/SSL and webserver/Application server ?:

  • HTTPS stands for Hyper Text Transfer Protocol Secure appears in the URL when a website is secured by an SSL certificate. The details of the certificate, including the issuing authority and the corporate name of the website owner, can be viewed by clicking on the lock symbol on the browser bar.
  • SSL stands for Secure Sockets Layer and, in short, it’s the standard technology for keeping an internet connection secure and safeguarding any sensitive data that is being sent between two systems, preventing criminals from reading and modifying any information transferred, including potential personal details.
  • web server is software and hardware that uses HTTP (Hypertext Transfer Protocol) and other protocols to respond to client requests made over the World Wide Web. The main job of a web server is to display website content through storing, processing and delivering webpages to users. Besides HTTP, web servers also support SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol), used for email, file transfer and storage.Web server hardware is connected to the internet and allows data to be exchanged with other connected devices, while web server software controls how a user accesses hosted files. The web server process is an example of the client/server model. All computers that host websites must have web server software.
  • Application server works with a web server to handle requests for dynamic content, such as servlets, from web applications. A web server uses a web server plug-in to establish and maintain persistent HTTP and HTTPS connections with an application server.

Once the TCP connection is established, it is time to start transferring data! The browser will send a GET request asking for holbertonschool.com web page. If you’re entering credentials or submitting a form, this could be a POST request. This request will also contain additional information such as browser identification (User-Agent header), types of requests that it will accept (Accept header), and connection headers asking it to keep the TCP connection alive for additional requests. It will also pass information taken from cookies the browser has in store for this domain.

5. The server handles the request and sends back a response.

The server contains a webserver (i.e., Apache, IIS) that receives the request from the browser and passes it to a request handler to read and generate a response. The request handler is a program (written in ASP.NET, PHP, Ruby, 0letc.) that reads the request, its’ headers, and cookies to check what is being requested and also update the information on the server if needed. Then it will assemble a response in a particular format (JSON, XML, HTML).

6. The server sends out an HTTPS response.

The server response contains the web page you requested as well as the status code, compression type (Content-Encoding), how to cache the page (Cache-Control), any cookies to set, privacy information, etc.

7. The browser displays the HTML content (for HTML responses, which is the most common).

what is database

In computing, a database is an organized collection of data stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques.

The browser displays the HTML content in phases. First, it will render the bare bone HTML skeleton. Then it will check the HTML tags and send out GET requests for additional elements on the web page, such as images, CSS stylesheets, JavaScript files, etc. These static files are cached by the browser, so it doesn’t have to fetch them again the next time you visit the page. In the end, you’ll see maps.google.com appearing on your browser.

That’s it!

Although this seems like a very tedious prolonged process, we know that it takes less than seconds for a web page to render after we hit enter on our keyboard. All of these steps happen within milliseconds before we could even notice. I sincerely hope this article helps you answer the question, “What happens when you type a URL in the browser and press enter?”.

--

--