What Happens When You Type https://www.google.com in Your Browser and Press Enter

Introduction

Oluwamurewa
3 min readMay 6, 2024

--

Have you ever wondered what exactly happens behind the scenes when you type a URL into your browser and hit Enter? The journey from your browser to the website you want to visit involves several intricate steps, each handled by different components of the web stack. In this article, we’ll delve into the journey of a simple HTTP request to https://www.google.com and explore the role of DNS, TCP/IP, Firewalls, HTTPS/SSL, Load-balancers, Web servers, Application servers, and Databases.

Web Infrastructure

1. DNS Request

The process kicks off with a Domain Name System (DNS) request. Your browser first needs to resolve the domain name “www.google.com" to an IP address. It sends a DNS query to a DNS resolver, which might be provided by your ISP or a third-party DNS service like Google DNS. The resolver then looks up the IP address associated with “www.google.com" in its database and returns it to your browser.

2. TCP/IP

Armed with the IP address obtained from DNS, your browser initiates a Transmission Control Protocol (TCP) connection to the IP address on port 443, the default port for HTTPS. TCP ensures reliable, ordered, and error-checked delivery of data between applications running on hosts communicating via an IP network.

3. Firewall

Before establishing the TCP connection, the traffic passes through any firewalls configured along the path. Firewalls act as barriers, filtering network traffic based on predefined security rules. They prevent unauthorized access and protect against malicious activity.

4. HTTPS/SSL

Once the TCP connection is established, if the URL begins with “https://” like in our case, it indicates that the communication will be encrypted using Secure Sockets Layer (SSL) or its successor, Transport Layer Security (TLS). SSL/TLS encryption ensures that the data transmitted between your browser and the web server is secure and cannot be intercepted by malicious actors.

5. Load-balancer

In the case of large-scale websites like Google, incoming requests are typically distributed across multiple servers to ensure optimal performance and reliability. A load-balancer sits between the client and the server farm, distributing incoming requests across multiple servers based on factors like server load, geographic location, or predefined rules.

6. Web Server

Upon receiving the HTTPS request, one of Google’s web servers processes it. A web server like Apache or Nginx handles the request, retrieves the requested resources, and constructs the HTTP response.

7. Application Server

In more complex web applications, the web server might delegate certain tasks to an application server. The application server executes application logic, interacts with databases, and generates dynamic content based on the client’s request.

8. Database

If the requested resource involves data retrieval or manipulation, the application server communicates with a database server to fetch or update the required information. In Google’s case, this could involve fetching search results from their vast database index.

Conclusion

As you can see, the journey of a simple HTTPS request to https://www.google.com involves a sophisticated interplay of various components across the web stack. From DNS resolution to database queries, each step contributes to delivering the requested web page to your browser in a seamless and secure manner.

Understanding this process provides valuable insight into how the internet functions and empowers us to optimize and troubleshoot web applications effectively.

--

--