DNS Record Types Explained

Search for a command to run...

No comments yet. Be the first to comment.
Comeing soon

In the previous blog of this JavaScript series, we explored JavaScript Operators: The Basics You Need to Know and learned how operators help us perform calculations, comparisons, and logical checks. B

In the previous blog of this JavaScript series, we learned about Variables and Data Types — how JavaScript stores information. Now the next question is: How do we actually work with those values? Th

If you're starting your JavaScript journey, one of the first concepts you'll encounter is Variables and Data Types. They are the foundation of everything in programming — from storing a user's name to

JavaScript Promises are one of the most misunderstood yet essential features in modern JavaScript development. Most articles explain the syntax. Very few explain: Why Promises exist How they actuall

Subhrangsu
18 posts
Let’s start with a simple question:
How does your browser know where a website lives?
When you type google.com, your browser doesn’t magically understand where Google’s servers are located.
It asks DNS for help.
And DNS answers using something called DNS records.
In this blog, we’ll understand what DNS records are, why they exist, and what each common record type actually does — without scary technical language.
DNS is the phonebook of the internet.
Humans use names like:
Computers use numbers like:
DNS exists to translate:
Website name → Server address
Without DNS, you would need to remember IP addresses to open websites. That would be painful.
DNS itself is just a system.
The real information lives inside DNS records.
DNS records tell the internet:
Think of DNS records as instructions stored for your domain.
Now let’s understand them one by one.
NS means Name Server.
NS records answer this question:
Which server is responsible for managing this domain’s DNS?
Imagine you register a new house.
You must tell the government:
Which office manages my address record?
NS records do the same thing for domains.
Example:
google.com → ns1.google.com
It means:
Google’s DNS servers manage google.com records.
A record is the most important DNS record.
It answers:
What is the IPv4 address of this domain?
Example:
google.com → 142.250.183.110
Your house name: “Blue Villa” Actual address: “Street 10, Building 25”
A record is that actual address.
When users open your website, browsers use A records to find your server.
AAAA record does the same job as A record — but for IPv6 addresses.
Why four A’s?
Because IPv6 addresses are much longer.
Example:
google.com → 2607:f8b0:4009:80b::200e
The internet is running out of IPv4 addresses.
IPv6 was introduced to solve this.
Modern systems often support both:
Your browser automatically chooses the best one.
CNAME means Canonical Name.
It answers:
This domain is an alias of another domain.
www.mywebsite.com → mywebsite.com
Here:
DNS will then resolve the final IP from that target.
Your nickname: “Alex” Official name: “Alexander Smith”
CNAME is like saying:
Alex is the same person as Alexander.
Simple rule:
If you already have an IP, use A. If you want aliasing, use CNAME.
MX means Mail Exchange.
MX records answer:
Where should emails for this domain be delivered?
Example:
example.com → mail.google.com
Your website server and email server are often different.
MX records allow:
to handle emails for your domain.
Without MX records:
Emails sent to your domain will fail.
They solve completely different problems.
TXT records store text-based data.
They are commonly used for:
Example:
v=spf1 include:_spf.google.com ~all
Looks confusing, but it simply tells:
Which mail servers are allowed to send emails for this domain.
Let’s say you own:
mywebsite.com
Here’s how DNS records work together:
Tells the internet:
Cloudflare manages this domain.
Maps domain to server:
mywebsite.com → 103.21.59.22
Your website loads using this.
Maps subdomain:
www.mywebsite.com → mywebsite.com
Both URLs work.
Handles email:
mywebsite.com → Gmail mail servers
Your email works.
Adds security and verification:
All these records together make your website:
DNS records may look confusing at first.
But when you see them as problem solvers, everything becomes simpler:
If you are learning backend, DevOps, cloud, or system design — DNS is not optional knowledge.
It is foundational.