What is DNS – and what happens during a lookup?
How a domain name is turned into an IP address: resolvers, root servers, TLDs, authoritative name servers and caching – explained step by step.
Every time you open a website, send an email or use an app, your device has to find out which IP address belongs to a name such as example.com. The system that answers that question is the Domain Name System – DNS. It is often called the phone book of the internet, but it is really a huge, distributed database where no single server knows everything, and every part of the name is managed by someone different.
The names are read from right to left
A domain name is a list of labels separated by dots. DNS reads them from the right. In www.example.co.uk the hierarchy is:
- The root – the invisible empty label at the very end (technically the name ends with a dot:
www.example.co.uk.). - The top-level domain (TLD) –
uk, run by a registry. - Second level –
co.uk, a zone under the TLD. - The domain itself –
example.co.uk, which the owner controls through their DNS provider. - Host names inside the domain –
www,mailand so on.
Each level only knows where to find the level directly below it. This is called delegation, and it is what lets millions of organisations manage their own names without a central bottleneck.
The players in a lookup
Stub resolver. The small DNS client built into your operating system. It does not do any real work itself; it simply asks a recursive resolver and waits for the answer.
Recursive resolver. Usually run by your internet provider, your company, or a public service such as Cloudflare (1.1.1.1), Google (8.8.8.8) or Quad9 (9.9.9.9). It does the legwork of finding the answer, and it keeps a cache of everything it has looked up recently.
Root servers. Thirteen named server sets (a.root-servers.net to m.root-servers.net), operated by twelve organisations and spread over more than a thousand physical locations. They do not know the address of example.com, but they know which servers are responsible for .com.
TLD servers. The servers for .com, .dk, .org and so on. They know which name servers each domain under them has been delegated to.
Authoritative name servers. The servers that actually hold the domain's records – typically run by your DNS host or registrar. Their answer is the truth; everything else is a copy.
A lookup, step by step
Say you type www.example.com into your browser and nobody has looked it up recently:
- Your computer asks its recursive resolver: "What is the IPv4 address (A record) of www.example.com?"
- The resolver asks a root server. The root server does not know, but replies with a referral: "Ask the .com servers – here are their names and addresses."
- The resolver asks a .com server, which replies with another referral: "example.com is handled by ns1.dnshost.net and ns2.dnshost.net."
- The resolver asks one of those authoritative servers, which finally answers: "www.example.com has the address 93.184.215.14" – with the authoritative answer flag set.
- The resolver gives the answer to your computer and stores it in its cache for as long as the record's TTL (time to live) allows.
The next person using the same resolver gets the answer instantly from the cache, and the resolver also remembers where the .com servers are, so it rarely needs to bother the root servers at all. This caching is what makes DNS fast – and also why DNS changes are not visible everywhere at once. The guide to propagation and TTL explains that in detail.
How webstriker uses this
When you run a lookup on webstriker, the tool plays the part of the recursive resolver itself – but without any cache. It starts at a root server, follows each referral, and ends up at the domain's authoritative name servers. The "Delegation from the root" table at the bottom of the report shows each step: which server was asked, how long it took, and where it pointed next. This is the same thing the command dig +trace example.com shows.
Because the records then come straight from the authoritative servers, you see what the domain's DNS says at this very moment. The report also compares that answer with what several large public resolvers have cached, so you can tell whether a recent change has reached them yet.
Common problems you can spot
- NXDOMAIN at the TLD. The domain does not exist in the registry – it may be misspelled, expired, or not yet activated after registration.
- Lame delegation. The parent zone points to name servers that do not answer for the domain. Typical after moving DNS to a new provider without updating the name servers at the registrar, or the other way round.
- Different NS sets at the parent and in the zone. The registrar lists one set of name servers, while the zone itself lists another. It often works, but it is fragile and should be cleaned up.
- Different SOA serials. If the name servers return different serial numbers, a secondary server has not received the latest version of the zone. Visitors may then get different answers depending on which server their resolver happens to ask.
Key takeaways
- DNS is a hierarchy: root → TLD → domain, each level delegating to the next.
- Recursive resolvers do the work and cache the results; authoritative servers hold the real data.
- To see the current truth, ask the authoritative servers – which is exactly what webstriker does.