DNS Record Types Explained

I am a Front-end Developer with 7 years of experience, started from HTML, CSS and JavaScript then switched into any UI Development again switched into React Development. Now Looking for anything like in language and started digging into that slowly.
How does a browser know where a website lives?
When you type a website name like google.com into your browser, do you know how the browser knows where that website actually lives? Computers don’t understand website names. They understand IP addresses. So how does your browser convert a human-friendly name into a server location? The answer is DNS.
What is DNS? (Phonebook analogy)
DNS stands for Domain Name System. DNS is like the phonebook of the internet. Just like a phonebook converts a person’s name into a phone number, DNS converts a website name into an IP address. That's it like hashnode.com into an IP(142.250.190.14).
Why DNS records are needed
DNS records store information about a domain.
They tell the internet
Where the website is hosted
Who controls the domain
Where emails should be delivered
Extra verification details
What is an NS Record?
NS(Name Server) records tell the internet who is responsible for a domain.
Think of NS records like the post office for your area. They tell where to ask for the correct address information. example.com → ns1.dnsprovider.com
What is an A Record?
An A record connects a domain name to an IPv4 address.
This is the most important DNS record for a website. example.com → IP(93.184.216.34)(IPv4)
What is an AAAA Record?
An AAAA record is similar to an A record, but it points to an IPv6 address instead of IPv4.
What is a CNAME Record?
A CNAME record points one domain name to another domain name.
It acts like a nickname(gharelu name :)). www.example.com → example.com
What is an MX Record?
MX (Mail Exchange) records tell where emails for a domain should be delivered.
example.com → mail.google.com
What is a TXT Record?
TXT records store extra information about a domain.
They are commonly used for:
Domain verification
Email security (SPF, DKIM)
Ownership proof
"v=spf1 include:_spf.google.com ~all"
How DNS records work together for one website
example.com uses:
NS record → tells who manages DNS
A record → tells where website is hosted
CNAME → points www to main domain
MX record → handles emails
TXT record → verifies domain ownership
One domain = multiple DNS records working together
Common Confusions (A vs CNAME, NS vs MX)
“A” Record vs CNAME
“A” record → domain → IP
CNAME → domain → another domain
NS vs MX
NS → who manages DNS
MX → where emails go
DNS is a system of records that tells the internet:
Who manages a domain
Where the website lives
Where emails should be delivered
DNS may look complex at first, but it becomes simple when you understand what problem each record solves.
Each DNS record has a clear responsibility, and together they help the internet find websites and deliver emails correctly.
Once you understand DNS records, debugging website and email issues becomes much easier.
I hope you understand about the DNS, If you would like to read like these type of articles, read out about the TCP vs UDP. You may also connect me from LinkedIn.
Thank you for reading this article.




