What happens when you type "https://www.google.com" and press enter
Tags: webdev, beginners, learning, google
Published: 2024-05-12 22:13:27

## **Introduction**
Until recently, I never questioned myself what happens behind the scenes whenever I search for a website and press enter, However gaining the knowledge about all of these steps right now makes me want to explain it in a way that's accessible to everyone.
Normally when you see this question and if you have no idea about the answer your basic answer would be that after I press enter I receive a page that I searched for but this actually not the case, there's much more to it, it goes through certain steps just to get you the page you see when you click enter, and these steps are:

- DNS request
- TCP/IP
- Firewall
- HTTPS/SSL
- Load-balancer
- Web server
- Application server
- Database
- Rendering
## **DNS request**


Simply the network devices are identified by their IP adderesses not their names, that's why when we initiate a website search, the first step is sending a request to the DNS (Domain Name System) server to look for the IP address of the domain name (which in this case is "google").
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7z1b4wsy7cxx2wvxzix.jpg)
The DNS server acts as a directory that maps domain names to their respective IP addresses.
## **TCP/IP**
Since we got the IP address from the previous step, now the computer(client) will use the IP to connect to the server just through the TCP(Transmission Control Protocol) connection.
To make it clear to you the TCP/IP acts as a reliable messenger that ensures excellent communication between your device and the destination server, working as a bridge that securely deliver your requests and receives respones and this only happens between your device and the destination server with no one in between.
## **Firewall**
The device you are using may has a firewall as well as the server might have a firewall too, so this firewall checks if the request is allowed, and if everything is okay here and there it allows the connection.
## **HTTPS/SSL**
Using HTTPS (HyperText Transfer Protocol Secure) makes sure the data transfered is secure by encoding the data using the methods SSL or TLS.

## **Load-balancer**
Since there might be multiple servers, the load-balancer makes sure that the request get to the right server, ensuring that no server will get busy with requests just to give the best experience to the client.
## **Web server**
The web server basically handles the HTTP request, decide the action that will be executed then communicate with the application server and deliver web content to the clients
## **Application server**
The application server is exactly where the execution of the request is made, interacts with the database and prepare the response to be sent
## **Database**
This is where data is stored, retrieved, and managed, ensuring that your search query is successfully executed

## **Rendering**
After the response is sent to your browser, the browser renders the HTML, CSS and Javascript to give you the page you see on the screen.
## **Conclusion**
 Isn't it very interesting?  the fact that all these steps 
 starting from DNS request to Rendering happens without people noticing any of it, literally in a blink of an eye. Understanding all these underlying processes should get you to appreaciate and love the world of web development.