What Happens When You Type google.com in Your Browser?
Over the past week, I've learned about computer networks, DNS, HTTP, HTTPS, cURL, and TCP/UDP. Today, I wanted to connect all of those concepts by answering a simple question:
What actually happens when we type
google.cominto a browser and press Enter?
It feels instant, but behind the scenes, dozens of processes work together in just a few milliseconds.
Let's follow the journey of a single request.
Step 1: You Enter the URL
Imagine you type:
https://google.com
and press Enter.
The browser now begins finding Google's server.
Step 2: Browser Cache
The browser first checks whether it already knows Google's IP address.
If you've visited Google recently, the answer may already be stored locally.
If found, it skips the DNS lookup.
Step 3: Operating System Cache
If the browser doesn't know the IP address, your operating system checks its own DNS cache.
Again, if the IP exists, the search ends here.
Step 4: DNS Lookup
If neither cache contains the answer, a DNS lookup begins.
The request travels through:
Browser
↓
Recursive DNS Resolver
↓
Root Server
↓
TLD Server (.com)
↓
Authoritative Name Server
↓
Google's IP Address
Eventually, the browser receives Google's IP address.
Step 5: TCP Connection
Now that the browser knows the destination, it needs to establish a connection.
It performs the TCP Three-Way Handshake:
Client
↓
SYN
↓
SYN + ACK
↓
ACK
Now both computers are connected.
Step 6: TLS Handshake (HTTPS Only)
Since Google uses HTTPS, the browser performs a TLS Handshake.
During this process:
The server presents its SSL/TLS certificate.
The browser verifies that the certificate is valid.
Both sides agree on encryption keys.
From this point onward, all communication is encrypted.
Step 7: HTTP Request
Now the browser finally sends an HTTP request.
Example:
GET / HTTP/1.1
Host: google.com
The server receives the request and starts processing it.
Step 8: Server Processing
Google's servers process the request.
They may:
Query databases
Check authentication
Generate HTML
Load user preferences
Retrieve images and other assets
Once everything is ready, the server prepares an HTTP response.
Step 9: HTTP Response
The server responds with:
Status Code (200 OK)
Headers
HTML
CSS
JavaScript
The browser receives this information.
Step 10: Rendering the Website
The browser now starts rendering the webpage.
It:
Parses HTML
Downloads CSS
Executes JavaScript
Fetches images
Builds the DOM
Paints everything on the screen
Finally...
Google appears in your browser.
The Entire Journey
User types google.com
↓
Browser Cache
↓
Operating System Cache
↓
DNS Lookup
↓
IP Address Found
↓
TCP Handshake
↓
TLS Handshake
↓
HTTP Request
↓
Server Processing
↓
HTTP Response
↓
Browser Rendering
↓
Website Appears 🎉
My Biggest Takeaway
Before learning networking, I assumed opening a website was a single action.
Now I understand that a tremendous amount of work happens behind the scenes before a webpage even starts loading.
Caching, DNS resolution, TCP connections, HTTPS encryption, HTTP communication, server processing, and browser rendering all happen within fractions of a second.
It's incredible how many technologies work together so seamlessly that we rarely notice them.
Understanding this complete flow has helped me connect everything I've learned over the past few days into one big picture.
As developers, knowing this process makes it easier to debug applications, optimize performance, and appreciate the engineering that powers the modern web.
See you tomorrow for Day 10 of my #100DaysOfCode journey! 🚀
