What is DNS And Why it's Important

Ashu SuhailAshu Suhail
5 min read

DNS:

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or Google.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

How Does DNS Work:

The process of DNS resolution involves converting a hostname (such as www.example.com) into a computer-friendly IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary to find the appropriate Internet device - like a street address is used to find a particular home. When a user wants to load a webpage, a translation must occur between what a user types into their web browser (example.com) and the machine-friendly address necessary to locate the example.com webpage.

In order to understand the process behind the DNS resolution, it’s important to learn about the different hardware components a DNS query must pass between. For the web browser, the DNS lookup occurs "behind the scenes" and requires no interaction from the user’s computer apart from the initial request.

There are 4 DNS Server Involved Loading a Web Page :

1. DNS Recursor:

A DNS Recursor (also called a recursive resolver) is a server that helps find the IP address of a domain name by querying multiple other DNS servers on behalf of a client (your browser or device).

It acts like a middleman between your device and the global DNS system.

How Does a DNS Recursor Work?

When you enter a website (example.com), the DNS recursor follows these steps:

  1. Receives the Request – Your browser asks the recursive resolver for the IP of example.com.

  2. Checks Cache – If it has the IP cached, it returns the result instantly. If not, it starts a recursive query.

  3. Queries Root DNS Server – The resolver asks a Root DNS Server where to find .com domains.

  4. Asks the TLD Server – The root server points it to a Top-Level Domain (TLD) server, which handles .com domains.

  5. Finds the Authoritative Server – The TLD server directs it to the Authoritative Name Server for example.com.

  6. Gets the IP Address – The authoritative server returns the correct IP address.

  7. Caches the IP – The recursor stores the IP for future use (for a set time called TTL).

  8. Returns the IP to the Browser – Your browser then uses the IP to load the website.

DNS Recursor Diagram:

[User Browser]


[DNS Recursor] ← (Checks Cache)


[Root DNS Server] → "Ask .COM TLD"


[TLD DNS Server (.COM)] → "Ask Example.com's Name Server"


[Authoritative DNS Server (example.com)] → "IP = 93.184.216.34"


[DNS Recursor (Caches Result)]


[User Browser Loads Website]

This shows how the DNS Recursor finds the IP address for a website by contacting different DNS servers in sequence.

2. Root DNS Server:

A Root DNS Server is the top-level server in the Domain Name System (DNS) hierarchy. It helps direct queries to the correct Top-Level Domain (TLD) servers (like .com, .org, .net).

Think of it like a giant directory that tells your DNS resolver where to go next when looking for a website’s IP address.

How Does a Root DNS Server Work?

When you type example.com in a browser, the process follows these steps:

  1. Browser Requests IP → Asks the DNS Resolver for example.com.

  2. DNS Resolver Contacts Root Server → If it doesn't have the IP cached, it asks a Root DNS Server.

  3. Root Server Directs to TLD Server → The Root Server doesn’t know the IP but tells the resolver to ask the .com TLD Server.

  4. TLD Server Points to Authoritative Server → The .com server tells the resolver to contact example.com's Authoritative DNS Server.

  5. Authoritative Server Returns the IP → The resolver gets the IP (93.184.216.34) and gives it to the browser.

  6. Website Loads

Root DNS Server Diagram

[Browser] → [DNS Resolver] → [Root DNS Server] → [TLD Server (.com)] → [Authoritative Server] → [Website Loads]

3. TLD Name Server:

A TLD (Top-Level Domain) Name Server is a DNS server responsible for managing domain names under a specific top-level domain (TLD) like .com, .org, .net, .edu, .in, .uk, etc.

It helps direct DNS queries to the correct Authoritative DNS Server for a domain.

How Does a TLD Name Server Work?

When you type example.com in your browser, the DNS lookup process follows these steps:

  1. Browser asks the Recursive Resolver – "What’s the IP for example.com?"

  2. Recursive Resolver asks a Root DNS Server – The Root Server responds: "I don’t know, but ask the .com TLD Name Server."

  3. TLD Name Server responds with the Authoritative Name Server – The .com TLD Server tells the resolver where to find example.com is Authoritative DNS Server.

  4. Authoritative DNS Server provides the IP – The resolver gets the IP (93.184.216.34).

  5. Browser loads the website

Diagram of a TLD Name Server in Action

[Browser] → [DNS Resolver] → [Root DNS Server] → [TLD Server (.com)]
→ [Authoritative DNS Server for example.com] → [Website Loads]

4. Authoritative DNS Server:

An Authoritative DNS Server is the final source of truth for a domain's IP address. It stores and provides the actual DNS records for a domain (e.g., example.com).

Think of it like the official directory for a specific website.

How Does a Authoritative DNS Server Work

When you enter example.com in your browser, the lookup process follows these steps:

  1. Your browser asks a DNS Resolver – "What’s the IP for example.com?"

  2. The Resolver queries a Root DNS Server – The root server points to the TLD (Top-Level Domain) DNS Server for .com.

  3. TLD Server points to the Authoritative DNS Server – The .com TLD server tells the resolver where to find example.com is Authoritative DNS Server.

  4. Authoritative Server provides the IP – It responds with example.com is actual IP address (93.184.216.34).

  5. Your browser connects to the website – The page loads!

Diagram of Authoritative DNS Server in Action

[Browser] → [DNS Resolver] → [Root DNS Server] → [TLD Server (.com)]
→ [Authoritative DNS Server for example.com] → [Website Loads]

Types of Authoritative DNS Servers

There are two types:

1. Primary (Master) DNS Server – Stores the original DNS records.

2. Secondary (Slave) DNS Server – A backup that syncs with the primary server.

Why is DNS Important?

. Makes Browsing Easier – Users don’t need to remember complex IP addresses.

. Load Balancing & Security – Distributes traffic and helps prevent attacks.

. Email & Authentication – Used for services like email validation (MX & TXT records).

0
Subscribe to my newsletter

Read articles from Ashu Suhail directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ashu Suhail
Ashu Suhail