# What Happens When You Type google.com? (DNS Explained Simply)

Most engineers use the internet every day without thinking about what actually happens before a page loads.

Understanding that process is one of the first building blocks of system design.

Let's start with a simple question: **what happens when you type** `google.com` **into your browser?**

* * *

## The Problem: Computers Don't Understand Names

Computers communicate using IP addresses, not domain names.

For example:

```text
142.250.190.78
```

An IP address is like a street address. It tells the internet exactly where a server lives.

The problem is obvious. Remembering `google.com` is easy. Remembering `142.250.190.78` is not.

That's why domain names exist.

* * *

## What Is DNS?

DNS stands for **Domain Name System**.

Think of it as the internet's phonebook.

You provide a name:

```text
google.com
```

DNS returns an address:

```text
142.250.xxx.xxx
```

Without DNS, every website would need to be accessed by its raw IP address. The modern internet would be unusable.

* * *

## How DNS Resolution Works

When you type `google.com`, your browser first checks:

> "Do I already know the IP address for this?"

If not, it starts a DNS lookup:

```text
Browser
   ↓
DNS Resolver (usually your ISP)
   ↓
Root Name Server
   ↓
TLD Name Server (.com)
   ↓
Authoritative Name Server (google.com)
   ↓
IP Address returned to browser
```

Once the browser has the IP address, it knows exactly where to send the request.

This entire process typically completes in milliseconds.

* * *

## Why DNS Caching Matters

![](https://cdn.hashnode.com/uploads/covers/656a14b0e1cbf742022775ae/edd632c9-e549-4fd7-ae7b-210514471753.png align="center")

Every DNS lookup takes time. If your browser had to repeat this process on every request, the internet would feel noticeably slower.

To solve this, DNS responses are cached at multiple levels:

*   **Browser cache** — your browser stores recent lookups
    
*   **Operating system cache** — your OS keeps its own DNS records
    
*   **ISP cache** — your internet provider caches lookups across all its users
    

When your browser already knows `google.com → 142.250.xxx.xxx`, it skips the lookup entirely.

This is why websites often load faster on the second visit.

* * *

## Why This Matters for System Design

Most engineers never think about DNS until something breaks.

But DNS sits at the very beginning of every request your users make. Understanding it helps you reason about:

*   Why a website becomes unreachable even when your server is running fine
    
*   Why DNS outages can take down entire companies
    
*   Why latency exists before a request even reaches your application
    
*   How traffic gets routed to the correct server across the globe
    

DNS is also the foundation for more advanced concepts like load balancing, failover, and CDN routing.

Before any of that complexity kicks in, a simple lookup has already happened. Silently. In milliseconds. Every single time.
