ResourceInformation

Library β€Ί Internet

🌐 Internet

How DNS Works: The Internet's Phone Book, Explained With Moving Pictures

Library Β· 19 November 2026 Β· 6 min read

You type resinfo.in, but computers on the internet only understand numbers like 203.0.113.7. Something has to translate the name into the number, in a split second, billions of times a day. That something is DNS, the Domain Name System. Let's watch it work.

1. The internet's phone book

On your phone you tap a name like "Mom", and the phone dials a number. You never memorise the number.

The internet works the same way. Every website lives on a computer with an IP address, a number like 203.0.113.7. Names like resinfo.in are just for humans. DNS is the phone book that turns names into numbers.

Without it you'd have to type numbers to visit every website. In fact, in the internet's early days a single shared file listed every computer's name and number. When the network grew too big for one file, DNS was invented, in 1983.

2. Watch one lookup, step by step

Here's what happens the first time your computer looks up www.resinfo.in. Each glowing dot is a question or an answer:

πŸ’» Youwww.resinfo.in203.0.113.7πŸ”Ž Resolveryour ISP, 1.1.1.1 or 8.8.8.8🌐 Root serverknows .com, .in, .orgβ€¦πŸ“ .in serverknows who runs resinfo.inπŸ“’ Name serverof resinfo.in: has the answer🏠 Websitelives at 203.0.113.71Your browser asks: β€œWhere is www.resinfo.in?”2Root server: β€œI don't know, but ask the .in server.”3.in server: β€œAsk the name server of resinfo.in.”4Name server: β€œwww.resinfo.in is at 203.0.113.7” βœ“5The resolver remembers it and tells your browser.6Your browser connects to that address. Page loads! πŸŽ‰
The resolver does the legwork: it asks the root server, then the .in server, then the website's own name server, and hands the answer back.
  1. Your browser asks a resolver. The resolver is a helper server, usually run by your internet provider, or a public one like Cloudflare's 1.1.1.1 or Google's 8.8.8.8.
  2. The resolver asks a root server. Root servers don't know every website, but they know who runs each ending, like .com, .in or .org.
  3. The resolver asks the .in server. It knows which name server is in charge of resinfo.in.
  4. The resolver asks that name server, called the authoritative server. It has the real answer: the IP address.
  5. The resolver passes the answer back to your browser, and remembers it for next time.
  6. Your browser connects to that IP address and the page starts loading.

All of that usually takes just a few dozen milliseconds, faster than a blink.

3. Why it's usually instant: caching

If every visit needed all those trips, the internet would feel slow. So DNS answers get remembered (cached) by the resolver, your computer and even your browser.

FIRST VISITthe resolver has to ask around: several tripsπŸ’» YouπŸ”Ž Resolver🌐 RootπŸ“ .inπŸ“’ Name server⏱ slower6 extra tripsNEXT VISITanswered from memory (the cache)πŸ’» YouπŸ”Ž ResolverπŸ“ Remembered:resinfo.in β†’ 203.0.113.7⚑ instantno trips neededTTLremembered for 5 minutes, then forgottenβŒ› Time's up: next time the resolver asks the servers again
The first lookup needs several trips. After that, the answer comes straight from memory until its time limit (TTL) runs out.

Every DNS answer comes with a TTL ("time to live"), set by the website's owner. It says how long the answer may be remembered, for example 300 seconds. When the TTL runs out, the next visitor triggers a fresh lookup. That's why, when a website moves to a new server, it can take a little while for everyone to see the change.

4. Names are read from right to left

A web address is really a path through a giant upside-down tree. DNS reads it from right to left, starting at an invisible dot at the end:

www.resinfo.in.← read from the rightRoot ( . ).com.in.orggoogle.comamazon.comresinfo.inwikipedia.orgwww
www.resinfo.in. β†’ start at the root ( . ), go to .in, then resinfo.in, then www.
  • Root ( . ): the top of the tree. There are 13 named root servers (A to M), with over a thousand copies spread around the world so they're always nearby.
  • Top-level domain: the ending, like .com, .org, or country endings like .in (India) and .uk.
  • Domain: the name someone registered, like resinfo.in.
  • Subdomain: anything in front, like www or mail. The owner can create as many as they like.

5. What's inside the phone book: DNS records

A domain's name server holds a small list of records. Each type answers a different question:

RecordAnswers the questionExample
AWhat's the IPv4 address?203.0.113.7
AAAAWhat's the newer, longer IPv6 address?2001:db8::7
CNAMEIs this name a nickname for another name?www β†’ resinfo.in
MXWhich server receives email for this domain?mail goes to a mail server
NSWhich name servers are in charge of this domain?two Cloudflare name servers
TXTAny notes for other services?proof you own the domain

A real example: this very website, resinfo.in, was bought from one company (the registrar) but its DNS is run by Cloudflare. To set that up, we simply changed its NS records to point at Cloudflare's name servers. From then on, Cloudflare answered every "where is resinfo.in?" question.

6. Try it yourself: a live DNS lookup

Type any website and ask the internet's phone book directly. This sends a real DNS question and shows the real answer:

Press Look it up to see the answer.

Lookups are answered by Cloudflare's public DNS (1.1.1.1). Nothing is stored by this website.

On a computer you can also do this in a terminal: type nslookup resinfo.in (Windows, Mac or Linux) and press Enter.

7. When DNS goes wrong

Because almost everything online starts with a DNS lookup, DNS problems can make huge services vanish, even when their servers are running fine:

  • October 2016: a flood of junk traffic from hacked home devices (the "Mirai" botnet) hit Dyn, a big DNS company. Sites like Twitter, Netflix and Reddit became unreachable for many people across the US and Europe.
  • October 2021: a faulty network change cut Facebook's name servers off from the internet. For about six hours, Facebook, Instagram and WhatsApp simply couldn't be found.

There's also a security side. Attackers sometimes try to send fake DNS answers that point you to a look-alike website. Modern protections like DNSSEC (digitally signed answers) and encrypted DNS (DNS over HTTPS) make that much harder.

Key takeaways

  • DNS turns names like resinfo.in into IP addresses, like a phone book.
  • A resolver finds the answer by asking the root, then the top-level domain server, then the authoritative name server.
  • Answers are cached for their TTL, which is why most lookups are instant.
  • Names are read right to left: root β†’ .in β†’ resinfo.in β†’ www.
  • Different records (A, AAAA, CNAME, MX, NS, TXT) answer different questions.

Quiz: test yourself

1. What does DNS turn resinfo.in into?

An IP address, the number computers use to find each other.

2. Who does the resolver ask first on a brand-new lookup?

A root server, which points it to the right top-level domain server (like .in).

3. Why is the second visit to a website faster?

The answer is cached, so no trips to DNS servers are needed until the TTL runs out.

4. Which record tells the world where to deliver email for a domain?

The MX record.

5. Reading right to left, what comes right after the root in www.example.com?

.com, the top-level domain.

Two new visual guides every week

Plus animated tech explainers on YouTube and Facebook.

More from the Library