Ever wondered what happens when you type: www.xyz.com
Let’s dive into the DNS architecture!!!
The domain name system (DNS) is a key part of internet infrastructure. DNS was created to solve the dilemma that computers work best with numbers, people not so much. Its basic function is to map names to numbers, like a phone book.
2. The Domain Name System is implemented as a hierarchical and distributed database containing various types of data, including hostnames and domain names. The names in a DNS database form a hierarchical tree structure called the domain namespace.
3. Now the question comes, who owns this database and how does a DNS resolution occur? When you buy a domain from websites like godaddy, an entry is made which maps the DNS name to a particular IP address. This record is called the Resource Record. These records are distributed in zone files. These files are then distributed and cached across servers called nameservers so that this information is stored in the DNS distributed database and is available for the internet.
4. Whenever a call is made, the nameservers determine the IP address and return it back to the client. These servers are also of 4 types.
5. Recursive Resolvers: These are provided by your ISPs. If they have the cached mapping of DNS to IP address, they give back, if not they make a further call to root nameserver.
6. Root nameserver: A root server accepts a recursive resolver’s query which includes a domain name, and the root nameserver responds by directing the recursive resolver to a TLD nameserver, based on the extension of that domain (.com, .net, .org, etc.). These are owned by ICANN.
7. TLD nameserver: When a recursive resolver receives a response from a TLD nameserver, that response will direct the resolver to an authoritative nameserver.
8. The authoritative nameserver is usually the resolver’s last step in the journey for an IP address. The authoritative nameserver contains information specific to the domain name it serves (e.g. google.com) and it can provide a recursive resolver with the IP address. These are generally owned by the organizations that have bought the domain.
9. Now, when you buy a domain from GoDaddy or any other website, they do the hosting for you. They basically act as the authoritative nameserver for the domain which you bought. You can also run your own authoritative server. The authoritative server contains the zone file containing the required resource records which are fetched from the distributed DNS database called the DNS registry. These are generally maintained by different organizations for different Top-level domains. Verisign is the registry of .com domains.