What happens when you type google.com or amazon.com into your browser?

What happens when you type google.com or amazon.com into your browser?


Overall Flow diagram

Hello everyone!

In today’s post, I’ll be discussing a fascinating and important topic: what happens when you type amazon.com or google.com into your browser? I’ll explain this process using AWS services to give you a clearer understanding.

Core Concept

At a fundamental level, everything on the internet is a computer-to-computer interaction. Websites like google.com or amazon.com run on a collection of Amazon EC2 instances. These EC2 instances are exposed to the world using an Elastic Load Balancer (ELB). The domain name, such as google.com or amazon.com, is managed using Amazon Route 53. There’s also an alias record in Route 53 that points the domain name (e.g., google.com or amazon.com) to the load balancer.

Before diving into the flow, it’s important to understand how domain names work. Let’s break down the example URL: https://api.www.google.com.

  • Root Domain: This is the dot after .com (e.g., https://api.www.google.com.)
  • Top-Level Domain (TLD): .com (e.g., https://api.www.google.com)
  • Second-Level Domain: google.com
  • Third-Level Domain: www.google.com
  • Fully Qualified Domain Name (FQDN): api.www.google.com.

Now, let's explore the network process step by step.

What happens when you type a URL like google.com in the browser?

Step 1: Typing the URL

You enter google.com into your browser.

Step 2: Browser Cache Check

Your browser first checks if it already has the IP address of google.com stored in its cache. If it finds it there, it skips further steps and directly connects to the IP address.

If not, the browser checks:

  • The Operating System’s cache
  • The Router’s cache (your home network)
  • The cache of your Internet Service Provider (ISP)

If the IP address isn’t found in any of these, the request is sent to a DNS resolver managed by your ISP.

Step 3: DNS Lookup

If the DNS resolver doesn’t have the IP address, it replies with something like, "I don't have the IP address for google.com, but I do have the address for the Top-Level Domain (TLD) .com."

The DNS resolver contacts the nameserver responsible for .com, which directs it to the nameserver hosting google.com. In this case, the Amazon Route 53 nameserver holds the DNS records for google.com and responds with the IP address of the Elastic Load Balancer (ELB) that serves the site.

Step 4: Connecting to the Load Balancer

Now that your computer has the IP address of the ELB, it sends a request to it. This ELB is responsible for distributing traffic to the underlying EC2 instances that host google.com.

Step 5: Receiving the Response

Finally, your computer receives the HTML, CSS, and JavaScript files from the EC2 instances. This is what gets displayed in your browser as the google.com webpage.


Now that you understand what happens behind the scenes when you type a URL into your browser, you can see how AWS services like Route 53 and Elastic Load Balancer help make the internet work seamlessly.

Stay tuned for more interesting insights and tutorials as I dive deeper into AWS services!

要查看或添加评论,请登录

Janarthanan Ravikumar的更多文ç«