DNS Internals

Domain Name System (DNS) is the internet's phonebook. It translates easy-to-remember domain names like www.google.com into the numerical IP addresses like 142.250.196.196 that computers use to communicate with each other. Without DNS, we'd have to memorize long strings of numbers for every website we want to visit.

member domain names like www.google.com into the numerical IP addresses like

What is DNS and Why Is It So Important?

Imagine you want to call your friend, Alex. You probably don't have Alex's phone number memorized. Instead, you open your phone's contacts, find "Alex," and press the call button. Your phone does the work of looking up Alex's name to find the actual number it needs to dial.

DNS does the exact same job for the internet.

The journey has three main stops:

1. The Root Servers (.)

At the very top of the pyramid are the Root Servers. There are 13 clusters of these servers strategically placed around the world. They don't know the IP address for www.google.com, but they know who to ask next. When your query arrives, the root server looks at the end of your domain—the .com part—and says, "I don't know, but you should go ask the .com server. Here's its address."

2. Top-Level Domain (TLD) Servers (.com, .org, .in)

The next level down contains the TLD servers. Each TLD server manages all the domains for a specific extension, like .com, .org, .gov, or country-specific ones like .in (India) or .ca (Canada). When the .com TLD server receives the query for www.google.com, it still doesn't have the final IP address. However, it knows which servers are the official record-keepers for the google.com domain. It replies, "I don't have the final answer, but you need to talk to Google's Authoritative Nameservers. Here are their addresses."

3. Authoritative Nameservers

This is the final destination and the ultimate source of truth for a domain. The Authoritative Nameserver is the server that holds the official, up-to-date DNS records for that specific domain (e.g., google.com). When this server receives the query, it looks through its records, finds the IP address for www.google.com, and provides the final, definitive answer back to your computer.

With the IP address in hand, your browser can now make a direct connection and load the website.

Types of DNS Records You Should Know

The Authoritative Nameserver doesn't just store one piece of information; it holds various types of records that serve different purposes. Think of these as different types of entries in a contact card—one for a phone number, one for an email address, and another for a physical address.

Here are some of the most common types of DNS records you should know:

  • A Record (Address Record): This is the most fundamental record. It maps a domain name directly to an IPv4 address (the most common type, like 93.184.216.34).

  • AAAA Record (Quad A Record): The modern sibling of the A record. It maps a domain name to an IPv6 address, a newer and longer format designed to accommodate the growing number of devices on the internet.

    • Example: example.com2606:2800:220:1:248:1893:25c8:1946
  • CNAME Record (Canonical Name): This record acts as an alias, pointing one domain to another. For example, you can make www.example.com point to example.com. This way, if the IP address for example.com changes, you only need to update one A record, and the CNAME will follow automatically.

  • MX Record (Mail Exchanger): This record tells the internet where to deliver emails sent to your domain. It points to the mail servers responsible for handling email for addresses like contact@example.com.

  • TXT Record (Text Record): This lets you store arbitrary text in the DNS. It's often used for security and verification purposes, such as proving to services like Google or Microsoft that you own a domain.

  • NS Record (Name Server Record): This record specifies the authoritative nameservers for a domain. It’s what the TLD servers use to direct queries to the correct final destination.

  • PTR Record (Pointer Record): This does the reverse of an A record. It maps an IP address back to a domain name. This is often used for security checks to see if a server is who it claims to be (a process called a reverse DNS lookup).

Together, these systems and records form the backbone of internet navigation, working silently in the background every time we go online.

0
Subscribe to my newsletter

Read articles from Syed Wasif Hussain directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Syed Wasif Hussain
Syed Wasif Hussain