what happens when you type https://www.google.com in your browser and press Enter.
- Ahmed Muawia
- Oct 26, 2024
- 7 min read
Have you ever wondered what’s going on behind the scenes when you browse a URL on the internet?
A simple action like typing “https://www.google.com" into your browser and hitting Enter seems straightforward, but it triggers a complex series of events behind the scenes. From the moment you press that key, a fascinating journey begins, involving multiple layers of technology working together to deliver the webpage to your screen in mere milliseconds. In this blog post, we’ll unravel the process that happens in the blink of an eye, demystifying the magic of web browsing. Whether you’re a tech enthusiast or just curious about how the internet works, join me as we explore the step-by-step journey of a URL request.
this blog will cover:
DNS request
TCP/IP
Firewall
HTTPS/SSL
Load-balancer
Web server
Application server
Database

Simple Secured Web infrastructure to demonstrate the process behind the scene when requesting a web page
1. DNS request & lookup
DNS “Domain Name System” it’s a service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks.
When you type “https://www.google.com" in your browser, first it looks up in the cache “all DNS information is cached in the browser and the operating system for fast rendering”. If the domain name is not in the cache a process called DNS lookup will make a query to the ISP Internet Service Provider’s DNS server to resolve the domain name “www.google.com” with it’s corresponding IP address.
2. TCP/IP connection Establishment
After the DNS lookup has successfully translated “https://www.google.com" into an IP address, the next step is to establish a TCP (Transmission Control Protocol) connection. This connection ensures reliable connection between your browser and google web server.
The connection is established using three-way handshake, Firstly the client (Browser) send a SYN (Synchronize) packet to server (Google web server) which establishes a client to server connection direction then Google server send back SYN-ACK (Synchronize-Acknowledge) packet to the browser to create server to client connection, then the Browser sends ACK packet back to Google server. Finally both the client and server have received acknowledgments and a full-duplex communication is established.

TCP/IP connecting
3. Firewall accessing
One essential component ensuring your connection’s integrity and security is firewall.
With the TCP connection established, your browser sends an HTTP GET request to the Google server. This request must pass through the firewall.
The firewall inspects the HTTP request for malicious content, ensuring that it adheres to security policies. Similarly, the firewall examines the incoming HTTP response from the server, checking for threats such as malware or unauthorized data.
Firewalls can be configured to block access to specific websites or content types. If access to “www.google.com" is restricted by your network’s policies, the firewall will block the request and prevent the connection.
Additionally, firewalls enforce access control rules, ensuring that only authorized devices and users can initiate connections to external servers.
4. Secured HTTP and SSL certificate
one of the critical processes that ensures your connection is secure is the HTTPS/SSL (Secure Sockets Layer) protocol. HTTPS (Hyper Text Transfer Protocol Secure) uses SSL/TLS (Transport Layer Security) to encrypt the communication between your browser and the web server, protecting your data from eavesdroppers and ensuring its integrity. Here’s how the HTTPS/SSL process works:
The browser sends a request to the Google server over port 443, which is the standard port for HTTPS traffic.
To establish a secure connection, your browser and the Google server perform an SSL/TLS handshake. This process involves several steps to authenticate the server and agree on encryption methods.
With the SSL/TLS handshake complete, a secure encrypted channel is established between your browser and the Google server. All data transmitted over this channel is encrypted using the session keys, ensuring that it cannot be read or tampered with by eavesdroppers.
Your browser sends an encrypted HTTP request to the Google server, asking for the web page. The server responds with an encrypted HTTP response, which includes the web page data. Your browser decrypts the response using the session keys and displays the web page to you.
When the browsing session ends, either the browser or the server can terminate the SSL/TLS session. A “Close Notify” message is sent, indicating that the session is closing. The session keys are discarded, and the secure connection is terminated.
5. Load Balancing
To ensure that you receive quick response a load balancer must be configured to the web infrastructure you making a request to.
A load balancer distributes incoming network traffic across multiple servers to ensure no single server becomes overwhelmed, improving both the performance and reliability of web services.
After the DNS lookup and SSL/TLS handshake, your browser sends an HTTP request to the IP address of “www.google.com". This request first reaches the load balancer rather than a specific web server. The load balancer acts as a reverse proxy, sitting between your browser and the backend servers.
The load balancer evaluates the current load on each of the backend servers. Based on its evaluation, the load balancer forwards your HTTP request to one of the backend servers. Several algorithms can be used for this decision, including:
Round Robin
Least Connections
IP Hash
The load balancer continuously monitors the health of the backend servers. If a server becomes unresponsive or fails, the load balancer automatically stops sending requests to that server. It reroutes traffic to the remaining healthy servers, ensuring uninterrupted service for users.
For some applications, it’s essential that subsequent requests from the same client are directed to the same server. This is known as session persistence or sticky sessions. The load balancer uses mechanisms like cookies or IP address tracking to ensure that the client is consistently directed to the same server during a session.
In many setups, the load balancer handles SSL termination. This means it decrypts the incoming SSL traffic before forwarding it to the backend servers. This offloads the resource-intensive SSL decryption process from the backend servers, allowing them to focus on serving content.
Load balancers also ensure high availability by distributing traffic across multiple servers located in different data centers or regions. If one data center goes down, the load balancer can redirect traffic to another, ensuring continuous availability.

6. Web server: Delivering Web Content to Your Browser
The web server plays the role of delivering the requested web page to your browser. A web server processes incoming requests from clients (such as web browsers) and serves the requested web pages or files.
After your request is routed through the load balancer, it reaches one of Google’s backend web servers. The web server receives the HTTP request, which includes information such as the requested URL, the HTTP method (GET, POST, etc.), and additional headers (like cookies and user-agent).
The web server processes the incoming request. This involves parsing the request headers and determining what resource (e.g., HTML file, image, video) the client is requesting. If the request is for a dynamic resource (e.g., a search query on Google), the web server may need to interact with backend applications, databases, or other services to generate the response.
For static resources, the web server retrieves the requested file from its file system and prepares it for delivery. For dynamic resources, the web server may pass the request to a web application server or script (e.g., PHP, Python, Node.js) that generates the content dynamically. The generated content is then returned to the web server.
The web server sends the generated response back to the client’s browser. This response includes the status line (e.g., HTTP/1.1 200 OK), response headers, and the body (the actual content). The body of the response could be an HTML document, an image, a JSON object, or any other type of web content.
If the web server encounters an issue while processing the request (e.g., the requested resource is not found), it generates an appropriate error response. Common error responses include:
404 Not Found: The requested resource could not be found.
500 Internal Server Error: The server encountered an unexpected condition.
403 Forbidden: The server understood the request but refuses to authorize it.
7. Application server for Dynamic page serving
Unlike web servers, which primarily handle static content, application servers are designed to generate dynamic content and run server-side applications.
After the web server receives your HTTP request, it determines if the requested resource requires dynamic processing (e.g., a search query). If dynamic content is needed, the web server forwards the request to the application server.
The application server receives the request and begins processing it. This often involves running server-side code or scripts (e.g., Java, Python, PHP, Ruby, Node.js) to generate the necessary content. For a search query on Google, the application server would run the logic to process the query, retrieve relevant data from databases or search indices, and prepare the results for the user.
The application server frequently interacts with databases to fetch, update, or store data. For instance, Google’s application server would query its massive search index database to find relevant search results.
Once the necessary data is retrieved and processed, the application server generates the dynamic content. This could be an HTML page, a JSON object for an API response, or any other format required by the client.
After generating the dynamic content, the application server sends the response back to the web server. The web server then includes this dynamic content in its HTTP response to the client’s browser.
8. Database: The Backbone of Dynamic Data Storage and Retrieval
a database plays a crucial role in storing, managing, and retrieving the vast amounts of data required to generate dynamic web content. Databases are essential for handling structured and unstructured data efficiently, ensuring that the information is accessible, consistent, and secure.
When you perform a search on Google, the application server processes your query and interacts with the database to retrieve relevant results. The database is optimized for search operations, using advanced indexing and querying techniques to quickly find and rank the most relevant results from billions of web pages.
To handle massive amounts of data and high query loads, databases are scaled horizontally by adding more database servers. Data is distributed across these servers to balance the load and ensure high availability. Replication ensures that copies of the data are maintained across multiple servers, providing redundancy and fault tolerance.
Conclusion :
A lot of processes for simple pressing of a key ENTER yeah!
Each of these components is a vital part of the web infrastructure, contributing to a smooth and efficient user experience. The cooperation between them ensures that when you access a website like Google, the process is not only fast but also secure and reliable. Understanding this complex interplay enhances our appreciation of the technological marvels that power our everyday web interactions.
As technology continues to evolve, so too will these components, continuously improving the speed, security, and reliability of our internet experiences. Whether you’re a tech enthusiast, a developer, or just a curious user, gaining insight into this behind-the-scenes process provides a deeper understanding of how the internet works and the sophisticated infrastructure that makes it all possible.



Comments