DEV Community

levi
levi

Posted on

How DNS works? : The Indian Post office analogy

Have you ever wondered how your browser knows where to find www.dev.to?
Its all thanks to DNS (Domain Name System) — the phonebook or postal system of the internet.
Let me break it down using something we all understand in India — the PIN code system.

POST MAN FINDNG HOME ADDRESS

Imagine you want to send a letter to "www.dev.to"
But you don’t know the exact house (IP address), only the name.
Here's how the process unfolds:

  1. Root DNS Server = Central Postal Director This is like India’s central postal directory. It doesn’t know where dev.to lives, but it knows:

"For .to domains, talk to the .to postal hub."

Just like the central system knows:
"For PINs starting with 1, go to Delhi. For 5, go to Hyderabad."
but dyk, there are onnly 13 such root servers.

  1. TLD Server = Regional Postal Hub (like .to Office)
    The .to server is like the regional hub for .to addresses.
    It says:
    "I know who handles dev.to. Go talk to that local post office (authoritative server)."

  2. Authoritative DNS Server = Local Post Office
    Now you're at the final post office — they know the exact house address:
    And this is where like of AWS route 53 comes in picture, responds to DNS queries for your domain, telling users where to find your website or app.

"www.dev.to lives at 192.0.2.1".

That’s the IP your browser needs to load the site.

DNS WOrking

Top comments (0)