Computers find each other by IP address, such as 203.0.113.10. People remember names, such as example.com. The Domain Name System (DNS) is the worldwide directory that turns one into the other.
When you visit a site, your device asks a resolver for the domain’s address. The resolver asks the root servers, then the servers for the ending (such as .com), then the domain’s own nameservers, which give the final answer. The answer is cached for a set time, its TTL.
A lookup, step by step
- Your device checks its own cache. If it looked up the name recently, it already knows the answer.
- It asks a resolver. Usually one run by your internet provider, or a public one such as
1.1.1.1or8.8.8.8. - The resolver asks a root server: “Who handles
.com?” There are 13 named root server addresses, served by hundreds of machines worldwide. - The root replies with the nameservers for
.com. - **The resolver asks a
.comserver:** “Who handlesexample.com?” It replies with that domain’s nameservers, the ones set at the registrar. - The resolver asks the domain’s nameserver for the record it needs, for example the A record for
example.com. - The answer comes back with an IP address and a TTL. The resolver caches it and passes it to your device.
This normally takes a few tens of milliseconds, and because almost every step is cached, most lookups skip straight to the end.
Records, nameservers and the registrar
- Records are the individual answers: A records hold IPv4 addresses, MX records name mail servers, and so on. See DNS record types.
- Nameservers are the servers that hold your domain’s records. See what a nameserver is.
- The registrar is where the domain is registered. Its main DNS job is telling the
.comservers which nameservers are in charge of your domain.
Why changes are not instant
Every answer carries a TTL, in seconds. A resolver that cached your old A record with a TTL of 3600 keeps using it for up to an hour. That delay, spread across thousands of resolvers worldwide, is what people call DNS propagation.
See it for yourself
dig example.com +trace
dig +trace performs the lookup from the root down and prints each step. On Windows, nslookup example.com shows the final answer.
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.



