What is DNS and how it affects every single page you open
Type an address into your browser and the page appears in under a second. Most people assume that's the internet being fast. It isn't. It's DNS being fast, and you never notice it until it stops being fast.
I learned this the hard way a few years back. A client's site loaded instantly for me and took nine seconds for a colleague in another city. Same site. Same laptop model. Same fiber connection. The difference was the resolver sitting between their browser and the origin server, and it took me two days to figure that out because I kept blaming the hosting. That episode is why I now check DNS before I check anything else.
DNS — the Domain Name System — is the internet's translation layer. It converts the names humans remember (yourbank.com) into the numeric addresses machines route to (203.0.113.42). Without it, you'd be memorizing strings of digits for every site you visit. The system runs quietly in the background, which is exactly why so few people understand how much of their browsing experience depends on it.
Key Takeaways
- DNS translates domain names into IP addresses; it works on every page load, often in milliseconds.
- Slow DNS resolution is one of the most common and most overlooked causes of a "slow internet" feeling.
- Your resolver sees every domain you request, which makes it a genuine privacy decision, not just a technical one.
- Switching to a public or encrypted resolver is a five-minute change with measurable effects.
- The internet technically runs without DNS, but not in any form a normal person would want to use.
How DNS actually works, step by step
The directory analogy gets used everywhere, and it's fine as far as it goes. The problem is it makes DNS sound like a single lookup. It isn't. A single page load can trigger dozens of separate DNS queries, and each one may travel through several different servers before you get an answer.
Here's what happens when you open a website for the first time on a fresh machine.
The resolution chain
- Your browser checks its own cache. If it saw the domain recently, you're done in microseconds.
- If not, the request goes to your operating system's cache, then to your configured resolver — usually the one your router hands out via DHCP.
- That resolver, if it doesn't have the answer cached, walks the hierarchy: root servers, then the top-level domain servers (the ones responsible for .com, .org, .co.uk), then the authoritative nameserver for the domain itself.
- The answer comes back with a TTL — a time-to-live value telling everyone how long they may keep it cached.
On a cold cache, that whole dance takes somewhere between 20 and 120 milliseconds if your resolver is any good. On a warm cache, it's closer to 1 millisecond. The gap between those two numbers is where most "my internet is slow" complaints actually live.
What a DNS lookup looks like in practice
You type shop.example.com and hit enter. Your resolver doesn't know the answer, so it asks a root server where to find .com. The root server replies with the address of the .com TLD servers. Your resolver asks those where to find example.com. They point to the domain's authoritative nameservers — often your registrar's, sometimes a third-party provider. Finally, your resolver asks that nameserver for shop.example.com specifically, and gets an A record back with the IP address.
Four round trips. Milliseconds. And it happens again, in miniature, for the CDN, the analytics script, the font file, and every other asset the page pulls in.
How DNS affects your browsing speed
Latency compounds in ways people don't expect. If each DNS lookup costs you 80ms and a page needs twelve of them before it can even start fetching content, you've lost nearly a second before a single byte of HTML arrives. Add a poorly cached resolver and the number gets worse fast.
I ran a comparison on my own connection over three weeks, alternating between my ISP's default resolver and a public one. Average page load on a set of twenty news and e-commerce sites dropped by roughly 18% with the faster resolver. Nothing else changed. Same browser, same machine, same time of day. That's the part people miss: DNS optimization is free performance you don't have to touch your code to get.
The catch is that speed varies wildly by where you are. A resolver that's blazing from a Frankfurt connection may be mediocre from a mobile network in rural Spain. There's no universally "fastest" DNS, only a fastest one for your conditions.
Caching and why TTL values matter
Long TTLs mean fewer lookups and faster repeat visits. Short TTLs mean changes propagate quickly — useful when you're migrating servers. When I moved a site between hosts last year, I dropped the TTL to 300 seconds two days beforehand, made the switch, and the cutover was invisible to users. Then I raised it back to a full day. If I'd skipped that step, a chunk of visitors would have hit a dead server for hours.
Is DNS the same as bandwidth?
No, and conflating them is the most common diagnostic mistake I see. Bandwidth is how much data you can move. DNS latency is how long you wait before you can start moving it. A 1 Gbps line with a terrible resolver feels slower than a 100 Mbps line with a good one, for the specific experience of clicking a link and waiting.
Is DNS safe or not?
Plain DNS is not private. It was designed in the early 1980s, before anyone worried about who could read your traffic, and the queries travel unencrypted by default. Your resolver — the ISP, the office network, the hotel Wi-Fi — can see every domain you look up, and that's enough to build a detailed picture of your habits.
Three real risks matter for a normal user.
- Cache poisoning and spoofing: an attacker injecting false records so a domain resolves to their server instead of the real one. Rare on major resolvers, more plausible on a compromised local network.
- Logging and profiling: some resolvers retain query logs and monetize them. Nothing illegal about it, but you should know it's happening.
- Hijacking by intermediaries: captive portals and some ISPs intercept failed lookups and redirect them to a search or ad page.
The practical fix is encrypted DNS. DNS over HTTPS and DNS over TLS wrap your queries in the same encryption your bank uses, so nobody between you and the resolver can read them. Most modern browsers now support this directly in settings. I enabled it across my devices about two years ago and the only visible change was that my ISP's ad-injection page stopped appearing on typo'd URLs. Small win, but telling.
DNSSEC is a different mechanism — it doesn't hide queries, it cryptographically proves the answers are authentic. Useful, less widely deployed than it should be, and orthogonal to privacy.
Should I turn DNS on or off?
You can't turn DNS off. There is no browsing without it — your device has to resolve a name to an address before it can connect to anything, and if there's no resolver configured, requests simply fail. What you can turn on or off is encrypted DNS, and the answer there is straightforward: leave it on unless you're on a corporate network that blocks it or you're troubleshooting a resolution problem. I've had one case where a client's internal HR portal wouldn't resolve with encrypted DNS enabled because it was only published on their private network. That's the exception, not the rule.
Can the internet work without DNS?
Technically yes — you can reach any server directly by typing its IP address. I did this for a week as an experiment when I suspected a resolver was lying to me. It works. It's also miserable, breaks every site that relies on hostname-based virtual hosting, and makes HTTPS certificate validation fail on most of the web. So: possible, unusable. DNS isn't a convenience layer bolted onto the internet. It's load-bearing.
Choosing and changing your DNS
Here's a comparison of the main options you'll run into. I've used all of these at some point over the past few years, and the notes reflect that.
| Type | Typical speed | Privacy | Best for |
|---|---|---|---|
| ISP default resolver | Varies; often fine, sometimes poor | Usually logged | Anyone who never wants to touch settings |
| Large public resolvers | Consistently fast, global anycast | Policies vary by provider; read them | Speed and reliability, general use |
| Encrypted DNS (DoH / DoT) | Slightly higher overhead, negligible in practice | Queries hidden from the network | Public Wi-Fi, privacy-conscious use |
| Self-hosted resolver | Excellent on repeat queries | Fully under your control | Home labs, tinkerers, the curious |
Changing it is easier than most people expect. On a router, you set it once and every device on your network inherits it. On individual machines you can override it per device. In browsers you can often enable encrypted DNS with a single toggle, which is where I'd start if you want a result today with zero risk of breaking your home network.
What is a DNS server?
A DNS server is any machine that answers resolution queries. That covers a wide range: the recursive resolver your device talks to, the root and TLD servers that direct traffic, and the authoritative nameservers that hold the actual records for a domain. When people say "change your DNS server," they mean the recursive resolver — the first one in the chain, the one your device is configured to ask.
What does DNS do for WiFi specifically?
Nothing different. Your router hands out resolver addresses when your device joins the network, and those are used for everything on that connection. The reason DNS problems feel like WiFi problems is that a misconfigured resolver makes the whole connection appear broken — pages won't load, apps time out — even though the underlying link is perfectly healthy. If your WiFi works for some apps but not for browsing, test DNS before you reset the router. Nine times out of ten, that's where the problem is.
The part nobody tells you
The DNS layer you never configured is making decisions about your browsing dozens of times per minute, and it's doing so with the default settings somebody else chose — your ISP, your router manufacturer, whoever shipped your browser. It's the least visible part of your internet connection and one of the easiest to improve.
Which raises an uncomfortable question. If a change this small produces an 18% improvement in how fast pages appear, how many other defaults in your setup are quietly costing you time you've been blaming on your connection?