DEV Community

Cover image for What Actually Happens After You Type google.com and Press Enter?
Ehtesham Zahid
Ehtesham Zahid

Posted on

What Actually Happens After You Type google.com and Press Enter?

Every day, we type a website into our browser, press Enter, and a webpage appears almost instantly.

It feels effortless.

What looks like a simple page load is actually powered by decades of engineering that most of us never think about.

Before your browser can even send its first HTTP request, it has to answer a surprising number of questions:

  • Where is this website?
  • How do I reach it?
  • Can I trust it?
  • How do we communicate securely?

Only after all of that can the webpage begin loading.

Let's follow the journey of a single request and see what really happens after you type google.com and press Enter.


Step 1: Finding Google's Address (DNS)

When you type:

google.com
Enter fullscreen mode Exit fullscreen mode

your browser has a problem.

Computers don't understand domain names. They communicate using IP addresses.

So the browser's first job is to answer one question:

"What is the IP address of google.com?"

This is exactly what DNS (Domain Name System) is built for. Think of it as the Internet's phonebook that translates human-friendly domain names into IP addresses.

Before asking the Internet, your browser first checks whether it already knows the answer:

  • Browser cache
  • Operating system cache
  • Router cache
  • Recursive DNS resolver

If nobody has it cached, the DNS resolver begins the lookup:

DNS Lookup Flow

Only now does your browser know where Google actually lives.

One thing I found fascinating is that DNS isn't one massive server. It's a globally distributed system where every server is responsible for only a small piece of the puzzle, making it both scalable and incredibly reliable.


Step 2: Establishing a Reliable Connection (TCP)

Knowing Google's IP address still isn't enough.

Before any data can be exchanged, your browser needs to establish a reliable connection with Google's server.

This is done using TCP's famous 3-way handshake:

Browser  →  SYN
Google   →  SYN-ACK
Browser  →  ACK
Enter fullscreen mode Exit fullscreen mode

Think of it as both sides agreeing:

"We're connected. Let's start talking."

During this handshake, both the browser and the server synchronize important information like sequence numbers and connection state, ensuring that data is delivered reliably and in the correct order.


Step 3: Verifying Identity & Securing the Connection (TLS)

At this point, your browser knows where Google is and has established a reliable connection.

But there's still one important question left:

"How do I know I'm really talking to Google?"

Communication is also still unencrypted. If your browser immediately started sending passwords, cookies, or search queries, anyone sitting in the middle could potentially read them.

That's why the next step is the TLS handshake.

During this handshake:

  • Google sends its digital certificate.
  • Your browser verifies that it was issued by a trusted Certificate Authority and really belongs to google.com.
  • Both sides securely agree on a shared encryption key.

One thing I found really interesting while learning about TLS was that it doesn't use a single type of encryption.

In reality, asymmetric encryption (RSA or, more commonly today, Diffie-Hellman/ECDHE) is used to securely exchange a shared secret.

Once both the browser and the server have that shared key, they switch to symmetric encryption (like AES) for all subsequent communication because it's much faster.

This was probably my favorite part of learning how TLS works.

It's such a clever design. Use asymmetric encryption only to securely exchange the key, then switch to fast symmetric encryption for everything else. You get the security of one and the speed of the other.


Step 4: Requesting the Webpage (HTTP)

Now that your browser knows Google's IP address, has established a TCP connection, and has negotiated a secure TLS session, it can finally do what we all assumed it did from the start:

Ask Google for its homepage.

It sends an HTTP request, essentially saying:

"Can I have your homepage?"

Ironically, the thing most people think happens first is actually one of the last steps before Google even begins processing your request.


Step 5: Finding the Right Server (Load Balancing)

Your request doesn't land on one magical computer somewhere.

Large services like Google run thousands of servers, all capable of handling the same request. A load balancer sits in front of them and decides which server should handle your request, helping distribute traffic and prevent any single server from being overwhelmed.

Depending on where you are, DNS may have already directed you to a nearby data center.

Someone opening Google in Pakistan and someone opening it in Germany may reach completely different servers while visiting the exact same website.

Same domain. Different server. Same experience.

That's one of the reasons modern websites feel so fast.


Step 6: Downloading the Rest of the Website

Google processes your request and sends back an HTTP response containing the page's HTML.

As the browser starts parsing the HTML, it discovers references to:

  • CSS (styling)
  • JavaScript (behavior)
  • Images
  • Fonts
  • Icons

Each of those usually triggers additional HTTP requests.

So loading a single webpage isn't just one request and one response. It often turns into dozens, sometimes even hundreds, of network requests, all happening behind the scenes in just a few moments.


Step 7: Rendering the Webpage

After all the resources arrive, the browser begins rendering.

It parses the HTML, applies CSS, executes JavaScript, lays everything out on the screen, and finally paints the page you see.

Only then does Google's homepage appear.

All of this usually happens in well under a second.

And to us, it just feels like a webpage loading.


Why It Feels Instant

None of this would feel magical if every website took 10 seconds to load.

The reason it feels almost instant is because the web is optimized at every layer.

  • Browsers cache resources.
  • DNS responses are cached.
  • CDNs bring content closer to users.
  • TLS handshakes have become much faster.
  • HTTP/2 and HTTP/3 reduce unnecessary delays.

Millions (probably billions) of requests go through this journey every single day.

The only reason it feels effortless is because countless engineers have spent decades shaving milliseconds off every step.


Final Thoughts

Typing google.com looks like one simple action.

In reality, it's a carefully orchestrated sequence of networking, cryptography, routing, caching, and distributed systems, all happening before you even see a search box.

Learning computer networking has completely changed the way I look at the internet.

The next time you press Enter, you'll know that your browser isn't just opening a webpage.

It's coordinating one of the most sophisticated systems humans have ever built.

Request Flow

Top comments (0)