Networking - Types of DNS Servers

DNS (Domain Name System) Types

There are four main types of DNS servers and four main types of DNS records.
I’ll explain both, since both are important.


A. Types of DNS Servers

These are the four major DNS server types involved when you type a domain name in your browser.


1. Recursive DNS Resolver (Client-Side DNS)

  • Also called a DNS Recursor.

  • It acts as an intermediary between your browser and the DNS hierarchy.

  • When you type a URL (e.g., www.google.com), the recursive resolver:

    1. First checks its cache to see if it already knows the IP.

    2. If not, it queries other DNS servers (Root → TLD → Authoritative) to find the IP.

  • Usually provided by:

    • Your ISP (Internet Service Provider)

    • Public DNS providers like Google (8.8.8.8) or Cloudflare (1.1.1.1)

Example:
If you search www.flipkart.com, your ISP's resolver finds its IP: 163.53.78.54.


2. Root DNS Servers (Top of DNS Hierarchy)

  • These are the highest-level DNS servers.

  • They don’t store actual IP addresses but redirect queries to the appropriate TLD server.

  • There are 13 root server clusters globally, managed by ICANN.

Example:
If you search www.amazon.com:

  • The resolver asks the Root Server.

  • The root server replies:
    “I don’t know the IP, but check the .com TLD server.”


3. TLD DNS Servers (Top-Level Domain Servers)

  • TLD = Top-Level Domain, such as .com, .org, .net, .gov, .in.

  • These servers store information about domains under a specific extension.

  • Managed by organizations like Verisign (.com, .net) or country-level authorities.

Example:
If you search www.amazon.com:

  • The .com TLD server replies:
    “Amazon’s authoritative DNS server is at ns-1234.awsdns.com.”


4. Authoritative DNS Servers (Final IP Source)

  • The last step in the DNS lookup process.

  • Stores DNS records for a domain.

  • Responds with the actual IP address of the website.

Example:
If you search www.amazon.com:

  • Amazon’s authoritative DNS server replies:
    “The IP address is 176.32.103.205.”


B. Types of DNS Records

DNS records store domain-related information inside authoritative DNS servers.
Here are the main types:


1. A Record (Address Record)

  • Maps a domain nameIPv4 address.

  • Most common DNS record.

Example:

Domain:   google.com
A Record: 142.250.190.78

2. AAAA Record (Quad-A Record)

  • Maps a domain nameIPv6 address.

  • Used for modern networking.

Example:

Domain:   google.com
AAAA:     2607:f8b0:4005:80a::200e

3. CNAME Record (Canonical Name Record)

  • Used to redirect one domain to another.

  • Helpful when multiple subdomains point to the same website.

Example:

www.example.com  →  example.com

When a user visits www.example.com, DNS redirects them to example.com.


4. MX Record (Mail Exchange Record)

  • Defines the mail server responsible for handling emails.

  • Essential for email delivery.

Example:

Domain: gmail.com
MX Record: smtp.gmail.com

5. TXT Record (Text Record)

  • Stores textual information for verification and security.

  • Used in SPF, DKIM, and Google site verification.

Example:

Domain: example.com
TXT: v=spf1 include:_spf.google.com ~all

6. NS Record (Name Server Record)

  • Points to the authoritative DNS servers for a domain.

Example:

Domain: amazon.com
NS Records:
ns-1080.awsdns-07.org
ns-1234.awsdns-50.com

7. PTR Record (Pointer Record)

  • Does the reverse of an A record.

  • Maps an IP addressDomain name.

  • Commonly used in email authentication.

Example:

IP: 142.250.190.78 → google.com

8. SRV Record (Service Record)

  • Defines the port and hostname for specific services.

Example:
Used in Microsoft Teams or VoIP services:

_sip._tcp.example.com  →  port 5060

9. SOA Record (Start of Authority)

  • Stores administrative details about a domain:

    • Primary name server

    • Contact email

    • Serial number

    • Refresh interval

Example:

Domain: example.com
SOA: ns1.example.com [email protected]

C. DNS Server Types vs DNS Record Types

Aspect DNS Server Types DNS Record Types
Purpose Handles DNS lookup process Stores DNS data
Examples Recursive, Root, TLD, Authoritative A, CNAME, MX, TXT, NS
When Used While resolving IP address While storing domain info
Example Google DNS (8.8.8.8) A Record → google.com → 142.250.190.78

D. Real-Life Example – DNS Lookup for www.flipkart.com

  1. You type: www.flipkart.com

  2. Browser asks Recursive Resolver → Provided by your ISP.

  3. Recursive Resolver contacts Root Server → Gets .com TLD info.

  4. TLD Server → Sends Flipkart’s authoritative server details.

  5. Authoritative Server → Returns IP 163.53.78.54.

  6. Browser connects → Website opens.


E. Summary

  • DNS Servers Types:

    1. Recursive Resolver → Starts the search.

    2. Root Server → Points to TLD.

    3. TLD Server → Points to Authoritative.

    4. Authoritative Server → Returns final IP.

  • DNS Record Types:

    • A / AAAA → IP mapping

    • CNAME → Domain redirection

    • MX → Email handling

    • TXT → Security & verification

    • NS → Points to name servers