This hierarchical system is what ensures that all domain names are unique. The Domain Name System doesn’t allow any two TLDs to be the same.
The administrators of each TLD then ensure that they don’t allow duplicate subdomains. Owners of subdomains are responsible for ensuring they don’t create duplicate secondary subdomains or duplicate-named resources.
Each administrative level is responsible only for its immediate subdomains — no single authority has to oversee the whole.
This is also how human-readable domain names are translated into computer-meaningful IP addresses.
The primary DNS servers have a directory that maps TLDs to specific IP addresses. Each TLD server has a similar directory for each subdomain.
These directories are distributed so that there isn’t a ever a single point of failure. This distribution scheme is a bit complicated, but at its essence, the DNS system works this way:
Your browser is trying to get to http://blog.example.com/index.html
First it asks the primary DNS servers who administers the .com domain.
Then it asks the .com administrator who administers the example subdomain.
Then it asks the example subdomain who administers the blog subdomain.
Finally it asks the blog subdomain administrator for the resource at index.html.
This all happens very quickly and automatically. Also, the web browser remembers this info, so it doesn’t go through the whole process every single time.
If you’re wondering how the browser gets the original location of the Primary DNS servers: a list of addresses is packaged into web browsers.
This provides a starting point. As it gets new information from the DNS administration system, it saves new address it’s been given. As long as at least one of its addresses is correct, it will be able to get all the other information it needs.