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

Asmaa ShehataAsmaa Shehata
4 min read

Asmaa Shehata

Asmaa Shehata

Typing any website domain name into your browser follows a set of rules which are standardized throughout the world. I will go over each step of What happens when you type google.com in your browser and press Enter, but first let’s start with a simpler example.

Suppose you were to type google.com into a browser. This is simpler because in the case of high traffic sites like google.com or facebook.com, your browser already knows the Internet Protocol (IP) address, of popular sites.

The IP address is like your home address; it is the specific combination of numbers and letters that points to your house. Every website has an IP address, and the domain name is a memorable name for the IP address. For example, typing 35.226.21.195 into your browser is the same as typing google.com`, but it is easier to remember google.com than a string of digits.

The domain name is linked to your IP address via an A Record, which I will cover when I discuss DNS. For now, understanding that 35.226.21.195 is the same thing as google.com is enough.

Typically, to query a domain name’s IP Address, your computer must access the internet in order to find a database filled with site’s domain name matched to their IP addresses.

The browser doesn’t really care what the domain name is so long as it has an IP address matched to a given domain.

Given how popular google.com is, it would not make sense for your browser to query the record of the A Record matching google.com IP address. So, your browser comes equipped with domain name to IP address matches for all the popular sites such as Google, Facebook, Youtube, NYTimes.com, etc. This record is kept in the browser cache memory. Cache memory is simply the computer’s method which makes retrieving data from the computer’s memory more efficient.

The browser’s cache memory holds popular sites, as does the computer’s Operating System (OS). If the browser does not have the IP address of the domain name in cache, it will query the OS to see if the IP address is on the OS’s cache memory.

Domain Name System

The DNS Process simplified

The Protocol Suite: TCP/IP

With the IP address at hand, Transmission Control Protocol/Internet Protocol (TCP/IP) — the protocol suite — kicks in. TCP establishes a reliable connection between your machine and Google’s server, ensuring data integrity and order. IP, on the other hand, is responsible for routing the data packets to the correct destination.

The Guard: Firewall

Before the packets venture further, they encounter the firewall — a security system ensuring that only safe and authorized traffic is allowed through. The firewall scrutinizes the packets based on predefined rules before permitting them onward.

The Secure Passage: HTTPS/SSL

As we tread into a secure domain (https), Secure Socket Layer (SSL) or its successor Transport Layer Security (TLS) ensure a secure connection by encrypting the data transferred between your browser and Google’s server, safeguarding against eavesdropping.

The Distributor: Load Balancer

Arriving at Google’s premises, a load balancer warmly welcomes the packets. Its job is to distribute incoming network traffic across several servers to ensure no single server becomes overwhelmed with too much traffic. This way, it ensures a seamless user experience.

The Frontman: Web Server

Post load balancing, the web server takes the stage, handling the HTTP request. It decides what action is needed, often communicating with an application server to process the request further.

The Processor: Application Server

The application server is the brain behind the operation, executing the necessary business logic, interacting with the database, and preparing the HTTP response to be sent back to your browser.

The Storer: Database

To fulfill your request, the application server might need to fetch or store data. It interacts with the database, where data is stored, retrieved, and managed, ensuring that your search query is successfully executed.

The Grand Finale: Rendering

The HTTP response makes its way back through the channels, reaching your browser which then renders the HTML, CSS, and JavaScript to display the webpage we all know and love as Google.

This orchestrated sequence of events, though appearing instantaneous to us, embodies a marvel of engineering and a testament to the boundless possibilities within the realm of technology.

0
Subscribe to my newsletter

Read articles from Asmaa Shehata directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Asmaa Shehata
Asmaa Shehata