You type facebook.com into your browser.
But here’s the thing —
your browser has no idea what “facebook” means.
Computers don’t understand names.
They only understand IP addresses.
So how does facebook.com turn into something a computer can actually find?
👉 That’s where DNS comes in.
In this blog, we’ll break DNS down in very simple terms and cover:
- What DNS is (no scary words)
- Why DNS records are needed
- What an NS record is (who’s in charge of a domain)
- What an A record is (domain → IPv4 address)
- What an AAAA record is (domain → IPv6 address)
- What a CNAME record is (one name pointing to another)
- What an MX record is (how emails find your inbox)
- What a TXT record is (verification & trust)
- How all DNS records work together for one website
What is DNS? (Think Phonebook 📖)
Think of DNS like a phonebook.
Your phonebook stores:
- Name → Phone number
DNS stores:
- Domain name → IP address
Example:
www.google.com → 142.250.72.206
Your browser looks up the domain name, finds the IP address, and then connects to it.
👉 DNS (Domain Name System) translates human-friendly domain names into machine-friendly IP addresses so browsers can load websites.
Fun fact:
You can actually paste the IP address directly into your browser — it’ll still open Google 😄
Why Are DNS Records Needed?
DNS records exist because:
- Humans can’t memorize IP addresses
- Domain names are easier to remember
- Websites can change IPs without changing their domain name
- Browsers need directions on where to go
Without DNS, the internet would look like this:
https://142.250.72.206
https://104.244.42.1
https://172.217.16.195
Yeah… not fun.
So DNS records act like instructions that tell the internet what to do with a domain.
DNS Works Using Records
DNS doesn’t work magically.
It works using different types of records, each with a specific job.
Let’s go through them one by one 👇
NS Record — Name Server Record
Have you ever bought a domain like example.com?
Usually:
- Domain bought from: Hostinger / Cloudflare
- Website hosted on: Vercel / Netlify
When you buy a domain, it comes with nameservers, like:
ns1.dnsparking.com
ns2.dnsparking.com
👉 NS records tell the internet which servers are responsible for answering DNS questions for a domain.
In simple words:
“Hey internet, if you want to know anything about this domain, ask these servers.”
Domains usually have multiple NS records so if one server goes down, another can respond.
A Record — Address Record (IPv4)
Now that DNS knows who is responsible, it needs to know where the website lives.
That’s the job of the A record.
Example:
example.com → 84.32.84.32
👉 A records map a domain name to an IPv4 address.
When you deploy your site:
- Hosting platform gives you an IP
- You add that IP as an A record in your domain provider
⚠️ A records only support IPv4 addresses.
AAAA Record — IPv6 Address
AAAA records are the same as A records, but for IPv6.
Example:
IPv4 → 142.250.72.206
IPv6 → 2606:4700:4700::1001
👉 AAAA records map a domain to an IPv6 address.
Why do we need this?
Because:
- IPv4 addresses are running out
- IPv6 solves that problem
If a website supports IPv6, DNS can return an AAAA record instead of an A record.
CNAME Record — One Name Points to Another
Sometimes hosting platforms don’t give you a fixed IP.
Instead, they give you a domain name, like:
my-project.vercel.app
This is where CNAME comes in.
👉 CNAME (Canonical Name) records point one domain name to another domain name.
How it works:
- You deploy your site on Vercel
- Vercel gives you
my-project.vercel.app - In your DNS settings, you add:
www.ensure.com → my-project.vercel.app
- DNS follows the name until it finds the IP
- Website loads 🎉
Platforms like Vercel and Netlify prefer CNAMEs because their IPs can change behind the scenes.
MX Record — Mail Exchange Record 📧
DNS is not just for websites.
It also handles emails.
When you send an email to:
hello@gmail.com
gmail.com is a domain.
DNS needs to know:
“Which server should receive emails for this domain?”
👉 MX records tell the internet which mail server handles emails for a domain.
Examples of mail servers:
- Google (Gmail)
- Microsoft (Outlook)
Without MX records, emails wouldn’t know where to go.
TXT Record — Verification & Trust
Ever wondered why some emails land in spam?
That’s often because the mail server can’t verify the sender.
👉 TXT records store extra information used for verification and security.
They are commonly used for:
- Email authentication (SPF, DKIM, DMARC)
- Domain ownership verification
- Preventing email spoofing
If TXT records check out:
- Email → Inbox ✅ If not:
- Email → Spam ❌
How All DNS Records Work Together
When you type a website into your browser, DNS doesn’t use just one record.
Here’s the flow 👇
1️⃣ NS Record
DNS checks: Who is responsible for this domain?
2️⃣ A / AAAA Record
DNS finds the IP address of the website.
3️⃣ CNAME Record (if used)
DNS follows one domain name to another.
4️⃣ MX Record
Used when someone sends an email to the domain.
5️⃣ TXT Record
Provides verification, trust, and security info.
In Short 🧠
- NS → Who answers DNS questions
- A / AAAA → Where the website lives
- CNAME → One name points to another
- MX → Handles emails
- TXT → Verification and trust
Together, these records make the internet work smoothly — without you ever noticing.
Top comments (0)