Shug Accidentally Learned DNS
How does a browser know where a website lives?

Frontend React Developer experimenting technology in a creative way👨🏻💻✨ | Aspiring Entreprenuer👨🏻💼📈
Shug was just opening a website.
It didn’t load.
He refreshed.
Same result.
Chrome showed:
DNS_PROBE_FINISHED_NXDOMAIN
One of those errors that looks serious but explains nothing.
He double-checked the spelling.
Internet was fine.
Other sites worked.
So why this one?
That’s when Shug realised something obvious, but late.
Browsers don’t understand website names.
They understand numbers.
You type example.com.
The browser needs something like 93.184.216.34.
Somewhere in between, that translation has to happen.
That system is DNS.
DNS, without the complicated talk
DNS is basically the phonebook of the internet.
You remember names.
The internet needs addresses.
Same way you save “Hitesh sir” in your phone instead of memorising his number.
DNS takes a name and finds the correct address behind it.
Simple idea.
Lots of small moving parts.
Why DNS has so many records
When Shug opened DNS settings, he expected one field.
Instead, he saw a list:
A, AAAA, CNAME, MX, TXT, NS.
It felt messy, but it isn’t.
Each record answers a different question.
Not everything at once.
One question at a time.
NS record : who’s allowed to answer?
Before anything else, the internet asks:
“Who is responsible for this domain?”
That answer comes from the NS record.
It points to the DNS servers that are in charge of the domain.
When Shug connected his domain to Cloudflare, the NS record told the rest of the internet:
“Ask Cloudflare about this one.”
No NS record means no authority.
No authority means nothing works.
A record : where the website lives
Once authority is clear, the next question is simple:
“Where is the website?”
That’s the A record.
It maps a domain name to an IPv4 address.
example.com → 93.184.216.34
Think of it like this:
Domain name is the place name
IP address is the exact location
Without an A record, the browser knows what you typed, but not where to go.
AAAA record : same idea, newer address
The AAAA record does the same job as A.
The only difference:
A → IPv4
AAAA → IPv6
IPv6 exists because the internet ran out of IPv4 addresses.
If your hosting supports it, you’ll see AAAA.
If not, A still works fine.
No extra philosophy needed.
CNAME — one name pointing to another
This one confused Shug the first time.
A CNAME does not point to an IP address.
It points to another domain name.
Example:
www.example.com → example.com
So when someone opens www.example.com, DNS quietly redirects the question to the main domain.
It’s useful for keeping things flexible.
One rule Shug learned the hard way:
A record → IP address
CNAME → domain name
Mixing them for the same hostname causes problems.
MX record : why email broke
The website came back.
Emails didn’t.
That’s because email doesn’t use A records.
It uses MX records.
When someone sends mail to hello@example.com, the internet asks:
“Which mail server should handle this?”
MX records answer that.
This is why:
Website hosting and email hosting are separate
Your site can be on one service and email on another
DNS keeps them organised.
TXT records : proof, not routing
TXT records look unimportant.
They aren’t.
They’re mostly used for verification:
Proving domain ownership
Email security checks
Service integrations
They don’t send traffic anywhere.
They just respond when something asks, “Is this legit?”
After breaking email verification once, Shug stopped deleting them.
How it all works together
For one normal website:
NS decides who’s in charge
A / AAAA decides where the site lives
CNAME handles extra names
MX routes email
TXT proves ownership and trust
Each record solves one small problem.
Together, they make the site work.
Final thought
DNS feels confusing until you stop treating it like theory.
Once Shug looked at it as:
“What question is this record answering?”
Everything made sense.
The site loaded.
Emails started coming in.
Shug finally made chai.
And promised himself not to touch DNS casually again. ☕



