Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained From Confusion to Clarity

Published
5 min read
DNS Record Types Explained From Confusion to Clarity
N

I build clean and simple web experiences and learn something new every day.

If DNS already felt a little magical, DNS records cann feel even more confusing.

I remember asking myself:

How does a browser know where a website lives?

How does email know server to reach?

Why does one domain sometimes point to another domain instead of an IP?

This blog is my attempt to explain DNS record types in the simple possible way without assuming any prior knowledge and without throwing scary networking terms at you.


1. A Very Simple Question First

When I type:

example.com

into my browser, how does it know:

  • which server to talk to?

  • where that server lives?

  • whether it should load a website or send an email?

The answer is DNS records.


2. DNS in the Simplest Terms

DNS is often called:

The phonebook of the internet

But here’s the part I didn’t understand at first:

DNS is not just one entry per website.

It’s more like a contact profile with multiple fields.


3. Why DNS Records Are Needed

A single domain needs to answer many questions:

  • Where is the website hosted?

  • Which server handles emails?

  • Is this domain verified for some service?

  • Is this name an alias of another name?

Each DNS record types solves one specific problem.


4. Think of a Domain Like a House

THis analogy helped me a lot:

Real LifeDNS
House nameDomain name
Street addressIP address
Owner infoDNS records
Post officeDNS system

Different records describe different parts of the same house.


5 NS Record - Who Is Responsible for This Domain?

What Problem It Solves

Who manages the DNS for this domain?

What an NS Record Is

NS (Name Server) records tell the world:

These servers are authoritative for this domain

They don’t give IP addresses. They just say where DNS questions should go.

Simple Example

example.com → ns1.provider.com
example.com → ns2.provider.com

Mental Model

NS records are like:

The office where official records are kept.


6. A Record - Domain to IPv4 Address

What Problem It Solves

Where is the website actually hosted?

What an A Record Is

An A record maps:

domain name → IPv4 address

Example:

example.com → 93.184.216.34

Real-Life Analogy

An A record is the exact street address of the house.

This is usually the record your browser cares about most.


7. AAAA Record - Domain to IPv6 Address

Why This Exists

The internet is slowly moving from IPv4 to IPv6.

What an AAAA Record Is

It maps:

domain name → IPv6 address

Example:

example.com → 2606:2800:220:1:248:1893:25c8:1946

Important Note

  • A = IPv4

  • AAAA = IPv6

Same purpose, different address format.


8. CNAME Record - One Name Pointing to Another

This record confused me the most at first.

What Problem It Solves

What if one domain should behave exactly like another?

What a CNAME Is

A CNAME (Canonical Name) record maps:

name  another name

Example:

www.example.com → example.com

Important Rule

❌ CNAME does NOT point to an IP ✅ It points to another domain name

Analogy

CNAME is like:

If you’re looking for me, just talk to this other person.


9. Common Confusion: A vs CNAME

A RecordCNAME Record
Points to IPPoints to domain
Final destinationAlias / nickname
Used for root domainsUsed for subdomains

Once this clicked, DNS made much more sense.


10. MX Record - How Emails Find the Right Server

What Problem It Solves

Where should emails for this domain be delivered?

What an MX Record Is

MX (Mail Exchange) records tell:

Send emails for this domain to these servers.

Example:

example.com → mail.google.com (priority 10)

Key Point

Web traffic and email traffic go to different servers.

That’s why MX records exist.


11. Common Confusion: NS vs MX

  • NS → Who manages DNS

  • MX → Who handles email

Different jobs. Different records.


12. TXT Record - Extra Information & Verification

What Problem It Solves

How can a domain prove something about itself?

What a TXT Record Is

A TXT record stores plain text.

Used for:

  • Domain verification

  • Email security (SPF, DKIM, DMARC)

  • Ownership proof

Example:

v=spf1 include:_spf.google.com ~all

Think of TXT as:

Sticky notes attached to a domain


13. How All DNS Records Work Together

For a single website, DNS might look like this:

NS → Who manages DNS
A → Website IPv4 address
AAAA → Website IPv6 address
CNAME→ www alias
MX → Email servers
TXT → Verification & security

All of them describe one domain from different angles.


14. One Complete DNS Setup (Small Website)

example.com
 ├─ NS → DNS provider
 ├─ A → Web server IP
 ├─ AAAA → IPv6 address
 ├─ CNAME→ www.example.com
 ├─ MX → Mail server
 └─ TXT → Verification records

Nothing here is extra. Each record solves a real problem.


15. High-Level DNS Flow (Big Picture)

Browser → DNS → IP Address → Server

DNS records are the instructions that make this flow work.


16. Final Thoughts

DNS records looked scary at first. But once I stopped memorizing definitions and started asking:

What problem does this record solve?

Everything clicked.

If you’re learning DNS too take it slow. It’s simpler than it looks.

More from this blog

C

codeXninjaDev

54 posts

I build clean and simple web experiences and learn something new every day.