Theo's Corner
dev / irl / thoughts
← Back
tech

How DNS works — the internet's phone book explained

Theo|Jun 2026|~4 min read

Every time you type a URL into your browser, something happens behind the scenes before the page even starts loading. That something is DNS — and understanding it makes a lot of other internet things suddenly make sense.

The problem DNS solves

Computers don't know what google.com means. They communicate using IP addresses — numbers like 142.250.74.46. DNS is the system that translates human-readable domain names into those IP addresses. It's called the internet's phone book because that's exactly what it does — you look up a name and get back a number.

What actually happens when you type a URL

Your browser checks its local cache first — if you've visited the site recently it might already know the IP. If not, it asks your DNS resolver (usually your ISP or something like Cloudflare's 1.1.1.1) which then works its way up a chain of servers to find the answer. The whole process usually takes milliseconds.

This is why AdGuard Home and Pi-hole work — they sit in place of your normal DNS resolver and block requests to known ad and tracker domains before they even reach your browser.

DNS record types

When you manage a domain you deal with different types of DNS records. The main ones are A records (point a domain to an IPv4 address), AAAA records (IPv6), CNAME records (point one domain to another domain), MX records (for email), and TXT records (for verification and other metadata). Most domain setups only need A and CNAME records to get started.

TTL and propagation

Every DNS record has a TTL — Time To Live — which tells other servers how long to cache it before checking for updates. When you change a DNS record, it doesn't update instantly everywhere because other servers are still serving the cached version. This is DNS propagation and it can take anywhere from a few minutes to 48 hours depending on the TTL. Cloudflare's low TTL is one reason changes there tend to propagate fast.

Why Cloudflare

I manage almost all my domains through Cloudflare. The DNS management is fast, the interface is clean, and you get DDoS protection and CDN caching for free just by proxying through them. Once you understand DNS, Cloudflare makes managing it genuinely easy.