Skip to main content

Command Palette

Search for a command to run...

🌐 How DNS Resolution Works (Complete Guide for Beginners)

Updated
2 min read

How does google.com actually open? I finally get it

So Hitesh sir was explaining DNS in the cohort and honestly my first reaction was — bhai ye HTML se pehle kyun padha rahe ho 😭

But then it clicked.

Your computer doesn't understand "google.com" — it only understands numbers like 142.250.192.14. DNS is basically the system that converts the name into the number. That's it. Simple.

Think of it like your phone contacts. You saved "Mom" but the phone is actually dialing a number. DNS does the same thing for websites.

The process when you type google.com:

Your browser first checks if it already knows the IP (cache). If not, it asks your ISP's DNS server. That server goes through a chain — root server → .com server → google's own server — and finally gets the IP. Then your browser connects and the page loads.

The whole thing happens in milliseconds and we never even notice it.

One tool I learned — dig command

If you're on Linux/Mac you can type dig google.com in terminal and actually see this process. It shows you which IP came back and how long it took. Pretty cool to see it working live.

Honestly networking felt useless to me at first. Now I get why Hitesh sir taught it before HTML. Everything on the internet runs on this stuff.