Maintenance

Site is under maintenance — quizzes are still available.

Go to quizzes
Tech

How DNS Actually Works Today

An explanation of the modern DNS system: how recursive resolvers, root servers, and authoritative nameservers work together, plus updates like DNS over HTTPS and geolocation-aware routing.

July 2026 6 min read 2 views 0 hearts

You type a website name into your browser. A page loads. It feels instant. But behind that two-second miracle is a system that started back in the 1980s, and it’s still evolving.

DNS, or Domain Name System, is often called the phonebook of the internet. But honestly, that comparison doesn’t do it justice. A phonebook is static. DNS is alive, distributed, and built to survive nuclear war. Well, that was the original design goal anyway.

Here’s the reality of how DNS works in 2025.

It All Starts With a Recursive Resolver

When you hit enter on pythonskillset.com, your computer doesn’t know where that is. So it asks a DNS resolver. This resolver is usually run by your internet provider, but more and more people use services like Cloudflare (1.1.1.1) or Google (8.8.8.8). The resolver does the heavy lifting.

The resolver first checks its own cache. If it already knows the answer from a recent query, it hands it back immediately. That’s why visiting a site twice feels faster. If it doesn’t have it cached, the real journey begins.

The Hierarchy That Makes It Manageable

DNS uses a tree structure. It’s not one giant lookup table. It’s a series of questions.

The resolver starts at the root servers. There are 13 logical root server systems, but actually hundreds of physical servers behind them. These root servers don’t know where your site is, but they know where to find the next clue.

The root points to the TLD servers (Top-Level Domain). If you’re looking for .com, the root sends you to the .com TLD servers. If it’s .org, you go to the .org ones.

The TLD servers don’t know the exact IP either. They know the authoritative nameservers for pythonskillset.com. These are the servers that hold the actual DNS records for the domain.

Finally, the resolver asks those authoritative servers: “Where is www.pythonskillset.com?” And the server replies with the IP address, say 192.0.2.1.

Then the resolver caches that answer and hands it back to your browser. Your browser then opens a connection to that IP.

But There’s More Happening Under the Hood

The example above is the traditional path. But today, a lot is changing.

First, DNS over HTTPS (DoH) is becoming the norm. Instead of sending your DNS queries in plaintext, they are encrypted and hidden inside normal HTTPS traffic. This stops your ISP from seeing every site you visit and prevents tampering. Browsers like Firefox and Chrome have supported this for years.

Second, CNAME flattening is widely used. Imagine you use a CDN. The authoritative server might not give you the same IP each time. Instead, it returns a CNAME record that points to a CDN domain. The resolver then has to look up that CDN domain too. This adds an extra step, but it helps route users to the nearest server.

Third, geolocation-aware DNS. Some DNS providers return different IP addresses based on your location. Hit a site from New York and you get the New York datacenter. Hit it from Tokyo and you get the Tokyo datacenter. The authoritative server checks the resolver’s IP to make this decision.

Why This Matters for You

If you run a website, understanding DNS is not optional. A misconfigured DNS record means downtime. A slow resolver means slow page loads. And if you don’t use DNSSEC (DNS Security Extensions), someone could redirect your users to a fake version of your site.

For developers, it means you shouldn’t hardcode IP addresses. Always use domain names. And when you debug network issues, nslookup and dig are your best friends.

The Bottom Line

DNS is not a phonebook. It’s a distributed, hierarchical, cached, encrypted, load-balanced system that works billions of times a day without you noticing. It’s one of the oldest parts of the internet, but it’s been modernized quietly and effectively.

Next time you click a link, just remember: your browser asked a chain of servers across the planet for directions, and they answered in milliseconds. That’s not just luck. That’s good engineering.

Comments

Questions, corrections, and tips stay visible for everyone reading this page.

0 in thread

Join the discussion

Shown next to your comment.

Up to 4,000 characters

No comments yet

Be the first to leave a note — it helps the next reader.