What happens when you type www.google.com and hit enter on your keyboard?
Tags: webdev, devops, database, computerscience
Published: 2023-05-12 09:03:44

**<h2>Introduction.</h2>**


The Uniform Resource Locator(URL), which is a reference to that web resource, identifies the place on a computer network where a web resource is located and how it can be retrieved. Let's look at what happens when you type in a URL, like [https://ww.google.com](https://www.google.com), in your browser and press Enter.

**<h2>A URL</h2>**


![dns lookup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1jyrtejlwbhl6ofijk1y.png)

When we look at the (URL), the first word stands for Hypertext Transfer Protocol Secure "**HTTPS**." It is an internet protocol that communicates with the server to handle the browser's request. The domain **google.com**
 includes the **"www"** subdomain. The URL is first sent to a Domain Name Server (DNS), a computer with a database of public **IP** addresses and the **hostnames** that correspond to them. The initial action that takes place when you search for any URL in the browser is referred to as a **DNS query**. The reason is that, unlike **IP** addresses, **hostnames** are strings with a domain name suffix that the servers cannot understand.
 
**<h2>TCP/IP connection</h2>**

![type_the_url](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qyr0mlp8456eyo4pixd.png)
Now that we have the corresponding **IP** address to our domain name, the next process is a **TCP** three-way handshake between both the browser **(client)** and server: **synchronize** (a.k.a. SYN), and **acknowledge** (a.k.a. ACK). The client here sets an initial SYN sequence number; the server also has its own sequence number, which increments the client’s SYN. The server then sends back a (SYN/ACK) packet to the client and awaits the client's ACK by incrementing its SYN.

**<h2>HTTPS/SSL</h2>**

Once the **TCP/IP** connection has been established, the browser proceeds to communicate with the server using a secure protocol (HTTPS). This protocol defines different types of requests **(e.g., GET, POST, and PUT)**, which are secured by a security protocol called **Secure Sockets Layer** that encrypts and decrypts the data from the client to the server infrastructure at the **load balancer**.


**<h2>Load Balancer</h2>**

The load balancer distributes website user requests across a number of servers when there is a high volume of requests in order to avoid a **single point of failure** (SPOF) or downtime. 


**<h2>The Firewall, also known as the Great Wall</h2>**

The firewall analyzes incoming traffic using pre-established rules and filters traffic from untrusted or shady sources to prevent attacks from hackers who can intercept user traffic. Users are permitted to connect to a web server that will be assigned by the **load balancer** if their requests are not malicious or suspicious.

**<h2>Web Server and Application Server</h2>**

![web servers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tk6tr3okv3kbkf26z66.png)

Now let’s do a recap. First, we started by doing a **DNS** query, which helps get an **IP** address associated with the domain name of our website. The **IP** address is sent back to our browser client, which sends the IP address to the server, where a **TCP/IP** connection is established. When this is done, the browser can now communicate with the server through the **HTTPS** protocol. The encryption and decryption of data between the server and the client are done through a standard security protocol called **Secure Sockets Layer** (SSL). The **load balancer** can then serve the web server with users’ requests if the firewall allows the incoming traffic.
Let’s define a **web server**. A web server is a software and hardware system that only handles **HTTP** and **HTTPS** requests and serves static content like simple **HTML** pages, plain text files, and images.
The application server, on the other hand, runs behind a web server and in front of a **database management system** (DBMS). Its main purpose is to generate dynamic content support for an application’s development and delivery, thus providing the business logic behind the application.

**<h2>Data Management</h2>**

**Database Management System** (DBMS), A program that allows the interaction with a database (an organized collection of structured information or data stored in a computer system) to define, manipulate, retrieve, and manage the data according to the request

**<h2>Conclusion</h2>**
This is the entire process when you type [https://google.com](https://www.google.com) and hit enter. It might look like a lot, but this happens within a few seconds, and you get dynamic content served to your browser through a secured **HTTPS** connection. I hope the explanation is easy to understand.