How DNS works when you open a website

DNS is the directory system that turns a human-friendly domain name into an IP address a network can use. When you type a URL, your browser first checks…

DNS is the directory system that turns a human-friendly domain name into an IP address a network can use. When you type a URL, your browser first checks its own cache, then the operating system and sometimes the router. If no answer is available locally, a resolver asks authoritative DNS servers for the record and returns it with a time-to-live value.

How it works

A DNS lookup is usually invisible, but it explains why a newly changed domain may work on one device before another. Different resolvers can cache an answer for different lengths of time, and a stale local cache can make a perfectly healthy website appear broken.

Practical takeaways

For troubleshooting, compare the result from your normal connection with a public resolver, flush the local DNS cache only when appropriate, and check whether the issue affects one domain or every domain. DNS changes are not instant because caching is part of the design.

DNS is not the same as hosting. It points a name to a service; it does not store the website itself.

In short: DNS works like a distributed address book. Caches make browsing faster, while TTL values decide how long an answer can be reused.