Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained

Updated
6 min read
DNS Record Types Explained

You may have heard the term DNS (Domain Name System) and wondered what it really means.
In this article, I’ll explain how DNS works in the simplest way possible, using easy words and real-life examples.

So Now Let's start with the simple question.

How does your browser know where a website lives?

When you type:


👉 google.com

Your browser is actually confused 🤔🙄😵 Because computers do not understand names like "google", "facebook", "instagram" etc.

Computers only understand numbers.

So someone has to tell the browser:

"Hey, google.com live at this number"

That "someone" is DNS.


What DNS Really Is (No Tech Meaning):

DNS is like the phonebook of the internet.

In your phone:

  • You save names like (Mom, Dad, Brother, Friends, Office)

  • But calling happens using a phone number

On the internet:

  • You type a website name

  • DNS finds the number

  • Browser goes there for lookup

Without DNS, the internet would look like this:


Type 142.250.182.14 to open 'Google'

And nobody wants that to remember the whole number. What if we have some tool that remember those large number for us, It’s kind of a middleware. And that's the reason why DNS plays a important role for us to find website actual location.


Why DNS Record Exist

DNS record are just small pieces of information that answer different questions.

Like:

  • Where is this Websites?

  • Who is in charge of this domain?

  • Where should email go?

  • Is this domain trusted?

Instead of putting everything in one place, DNS uses different record, each with one clear job.


NS Record-Who is Responsible for This Website?

Imagine an apartment building 🏢 You don't ask any random people about a flat-you go to the main office.

NS record is that main office.

It tells the internet:

"Ask this company for all information about this domain."

So NS record answers:

  • Who manages this website?

  • Who has the authority?

Without NS:

  • Internet would not know where to ask questions and to whom.

A Record- Where Is the Website?

This is the most important record. A Record tells the exact address of the website. Think of it like:

  • House name -> House number

Example:


example.com -> 93.128.332.34

Your browser:

  • Find this number

  • Goes direct to the server with the help of that number

  • And finally load the website for us in the browser

Simple and direct.


AAAA Record - Same Job, Newer System

AAAA record does the same thing as A record. The only difference:

  • A record -> Old type address

  • AAAA record -> new type address

You don't need to worry much about it. Just remember:

A and AAAA both tell where the website lives.


CNAME Record - Another Name for the Same Place

Something a place has two names.

Example:

  • "Main street shop"

  • "MS Shop"

Both go to the CNAME does.

Example:


www.example.com -> example.com

This means:

Easy difference to remember:

  • A Record -> name to number [google.com -> 123.652.88.90]

  • CNAME -> name to name [it's like giving someone to a nickname]


MX Record - How Emails Know Where to Go

Now let's talk about email📧 When someone sends:

hello.example.com

The internet asks:

"Where should i deliver this email?"

The answer comes from the MX record. The MX is like a post office address. It tells:

  • Which mail server receives emails

  • For that domain

No MX record = No email delivery.


TXT Record - Extra Notes and Proof

TXT records are like sticky notes attached to a domain. They are used to:

  • Prove ownership

  • Keeps email safe

  • Verify services

Example:

  • Google asks: "Is this your domain?"

  • You add a TXT record

  • Google checks it

  • Done ✅

TXT records don't affect websites directly -- they help in the background.

How Everything Works Together (One simple Story) Let's say someone opens your website.

Step-by-step:

  1. Browser looks for NS -> Who controls this domain?

  2. DNS server gives A / AAAA -> Here is the website address

  3. If www is used, CNAME helps -> Redirects to main name

  4. If someone sends email, MX helps -> delivers email properly

  5. TXT keeps things verified and safe

All Records work together like a team.


One Complete DNS Setup (Easy View)

NS    -> Who manage the domain
A     -> WEbsite address
AAAA  -> Newer website address
CNAME -> Another name
MX    -> Email delivery
TXT   -> Proof and Security

Final Words (Very important)

DNS sounds scary only because of it's name.

But in reality, its just:

A system that helps names find the right place.

If you understand Phonebook, House address and Post office, then you already understand DNS.