DNS Record Types
How does a browser know where a website lives?
This was honestly one of my first questions when I started learning about how websites work.
You type www.example.com into your browser, hit Enter, and boom — the site loads. But how does your browser know where that website actually is?
That’s when i tried searching for more and found out bout DNS.
What is DNS?
(as much as i know)
DNS (Domain Name System) is basically the phonebook of the internet.
Humans like names like google.com
Computers don’t understand names — they understand numbers (IP addresses)
So DNS does one main job:
It turns a website name into a number so computers know where to go.
Real-life example:
You save a contact as “Mom” on your phone, but your phone actually dials her number. DNS works the same way.

Why DNS records are needed
A domain name does more than just show a website.
It also needs to:
1. Tell browsers where the website server is
2. Decide who controls the domain
3. Tell email systems where to deliver emails
4. Prove the domain is legit
Instead of stuffing all this info into one place, DNS breaks it up into records.
Each DNS record has one job.
Think of DNS records like little notes attached to a contact — address, email, extra info, etc.
What is an NS Record? (Who’s in charge of the domain)
NS stands for Name Server.
NS records are basically what points to the DNS servers that are allowed to give answers about the domain.
Real-life example:
It’s like knowing which office handles your house address.
Without NS records, the internet wouldn’t know where to look for anything else.
What is an A Record?
(Domain → IPv4 address)
An A record connects a domain name to an IPv4 address.
Example:
example.com → 93.184.216.34
This is what actually tells your browser where the website server lives.
Real-life example:
Street name → house number
Most websites still use IPv4, so A records are everywhere.

What is an AAAA Record? (Domain → IPv6 address)
An AAAA record does the same thing as an A record, but for IPv6.
Example:
example.com → 2606:2800:220:1:248:1893:25c8:1946
IPv6 exists because the internet is slowly running out of IPv4 addresses.
If a site has both A and AAAA records, modern browsers usually try IPv6 first and fall back if needed.
What is a CNAME Record? (One name pointing to another)
A CNAME (Canonical Name) record means:
“This name is just an alias — check another name instead.”
Example:
www.example.com → example.com
The browser follows the trail until it finds a real IP address.
Real-life example:
A nickname pointing to your real name.
Common confusion: A record vs CNAME
This confused me at first:
A record → points directly to an IP address
CNAME record → points to another domain name
You can’t use both for the same name.

What is an MX Record? (How emails find your mail server)
MX stands for Mail Exchange.
MX records answer this question:
“Where should emails for this domain go?”
Example:
example.com → mail.example.com
Real-life example:
Your house isn’t where mail is sorted — the post office is. MX records tell email systems where that post office is.
Common confusion: NS vs MX
Another easy mix-up:
NS records decide who controls DNS
MX records decide where emails are delivered
Totally different purposes.

What is a TXT Record? (Extra info and verification)
TXT records store simple text information.
They’re commonly used for:
1. Email security (SPF, DKIM, DMARC)
2. Proving domain ownership
3. Verifying services like Google or Microsoft
TXT records don’t point anywhere — they just prove things.
Real-life example:
Extra notes taped to your mailbox.

How all DNS records work together for one website
Let’s say you own example.com.
A basic DNS setup might look like this:
NS → Says which DNS provider manages the domain
A / AAAA → Tells browsers where the website lives
CNAME → Makes www.example.com work
MX → Makes email work
TXT → Adds security and verification
Each record does a small job.
Together, they make sure the website loads and emails actually arrive.

Thanks for reading my blog =)