The DNS Protocol: Usually, people don’t often type in a bunch of numbers to visit a website. Instead, we use names like google.com or codinginterviewpro.com. It’s like calling a friend by their name instead of remembering their phone number.
This is handy because, let’s say you want to move your website to a different place, like changing houses. You can do that, but your friends (or the people on the internet) still find you easily because they know your name, not your old or new house number.
The system that connects names like google.com to their computer numbers (IP addresses) is called DNS: Domain Name System.
DNS is like a network of servers, kind of like a big phone book for the internet. Your internet provider already has its own DNS, and your Wi-Fi box is set up to use it.
But you can also choose to use Google’s DNS server, which is like using a different phone book. Google’s DNS server has the number 8.8.8.8. It’s just another way to find the right numbers for the names on the internet.
When your computer asks those DNS servers for help, those servers, in turn, ask their own big boss for more information.
This system is like a tree. At the very top, there’s one special DNS server called the root DNS server. It’s like the main boss in charge.
To make it simpler, the top boss (root DNS server) knows the phone numbers (IP addresses) of the DNS servers that handle different kinds of website names, like .com, .net, .org, and even country-specific ones like .uk or .jp. It also knows about newer ones like .blog, .dev, or .tech.
Those specialized DNS servers know the phone numbers (IP addresses) of all the websites under their type.
Of course, the system is designed to remember things for a while, make sure there are backups, and handle lots of requests at once, but that’s the basic idea. It’s like a big directory to find the right phone number for any website name you want.