Comment on How does DNS work?

sem@piefed.blahaj.zone ⁨2⁩ ⁨weeks⁩ ago

It’s recursive too. When you want to go to domain.tld, you ask your computer, what is the ip address for domain.tld?. If it hasn’t been there yet, or the answer is too old, it asks the next step up, which might be your router. Repeat this process (maybe the router doesn’t know) it might be setup to ask your isp, or a company like quad 9. These companies keep all the records, but even they aren’t authoritative. Whenever they need to, they ask a root server, “which server is in charge of the top level domain .tld?” They get an ip address answer. Then they ask that tld name server, “who is in charge is of domain.tld” and get an answer. Repeat for any subdomains like sub.domain.tld

There are plenty of implementation details (like time to live) but those are the broad strokes.

original
Sort:hotnewtop