What Happens when you type www.google.com and press enter
Published: 2024-02-11 19:00:32

When you type anything into your browser press Enter and get a response, a lot happens in the background. There is a path that data flows through for you to get your response. Let’s try to explain it now:

**DNS request**
Before we describe what happens when you type “www.google.com” into your browser, let’s first describe what “www.google.com” is.
www.google.com is a domain name. A domain name is a human-readable address that is used to identify a specific location on the web. So a DNS translates the domain name into a more computer friendly ip address which is hard for humans to memorise. Using our example the current IP address for www.google.com is 142.251.47.100 (The IP address can change so to get the current one you can use the ping command). So in short the DNS translates www.google.com to 142.251.47.100.



**TCP/IP**
After the DNS has done it’s work, the TCP/IP suite comes into play. Now with the IPaddress your computer wants to communicate with the server hosting www.google.com. TCP(Transmission Control Protocol)  layer is responsible for establishing a reliable connection between your device and the server. Once the connection is established, data can be transmitted. TCP ensures the reliable and ordered delivery of data
The IP(Internet Protocol) layer is like the address system for the internet. It makes sure your data packets know where to go (destination IP address) and where they came from (source IP address) as they travel through the network to reach their final destination.

**FIREWALLS**
As the connection is established, the data passes through firewalls, essential security measures that monitor and control incoming and outgoing network traffic based on predetermined security rules. Firewalls act as a barrier between your computer and potential threats, ensuring a secure data exchange.

**HTTPS/SSL**
HTTPS(Hypertext Transfer Protocol Secure) encrypts the data exchanged between your browser and the server using SSL (Secure Sockets Layer). When you visit a website, like Google, HTTPS scrambles the information you send and receive so that nobody else can understand it. This includes things like your passwords, credit card numbers, and personal messages. It's like speaking in a secret language that only you and the website understand, keeping your information safe from people who might try to listen in


**Load-Balancer**
An organisation as big as google has a lot of servers to manage all the data and store all the information and pages. Load balancers ensure that requests are evenly distributed among multiple servers to optimise performance.

**Web Server**
After reaching Google's servers, the request is processed by a web server. So, the web server efficiently manages the initial interaction, quickly fetching and handing over the static content of the webpage to your browser. This helps make your experience faster because you don't have to wait for the dynamic, personalised content just yet.

**Application Server**
For dynamic content or specific functionalities, the web server might communicate with an application server. This server processes the request, generates dynamic content, and executes any necessary server-side code. This interaction allows the webpage to show content tailored to your needs

**Database**
In cases where the web page requires data from a database, the application server communicates with the database server. This interaction involves querying the database to retrieve the relevant information