DNS Record Types

How does a browser know where a website lives?
Suppose you open the gallery on your phone and see various photos stored in your phone’s internal memory. Those photos exist somewhere physically inside your device, and your phone knows exactly where to find them.
But what happens when you type www.google.com in your browser? The website isn’t stored on your device. Websites like Google are stored on special computers called servers somewhere on the internet.
Your browser asks the Domain Name System (DNS) to translate the website name into an IP address (the real location of the server). Then it connects to that server and loads the website for you.
What is DNS?
DNS (Domain Name System) is the system that translates human-friendly website names into IP addresses that computers use to identify each other on the internet.
DNS is often called the “phonebook of the internet” because it connects names to numbers, just like a traditional phonebook does.
When you type a website like www.google.com into your browser:
You know the website name (like a person’s name).
Your computer doesn’t understand names - it needs an IP address (like a phone number).
DNS looks up the IP address for that website and gives it to your browser.
Your browser uses that IP address to connect to the correct server.
DNS uses different types of DNS Records to get the IP Address.
What are DNS Records?
DNS records are instructions stored in the Domain Name System (DNS) that tell the internet (browser) how to handle a domain name. They are the backbone of how domain names (likewww.google.com) are translated into IP addresses (like 142.251.40.142) so computers can communicate.
Why DNS Records are needed?
DNS records are needed because they tell the internet how to find and interact with your domain. Without them, a domain name would just be a name - computers wouldn’t know where to send traffic for websites, email, or other services.
Delegation of Responsibility
NS records tell the world which servers are authoritative for your domain.
Without NS records, no one knows who to ask for your domain info.
Translate Names to IPs
The A record (or AAAA record for IPv6) tells computers the IP address of your website.
Without it, typing
example.comwouldn’t go anywhere.
Alias or Redirection
CNAME records let you point one domain to another (like
www.google.com→google.com).Makes managing multiple subdomains easier.
Direct Email Traffic
MX records specify which mail servers handle email for your domain.
Without MX records, emails sent to your domain would get lost.
Security and Verification
DNS records (like TXT) prove your domain is yours and stop fake emails
Without them, your emails might be marked as spam.
What is an NS Record ?
An NS record (Name Server record) tells the internet which servers are responsible for managing a domain. In other words, it points to the DNS servers that “know” all the other records for that domain.
Example :
If example.com has NS records pointing to ns1.host.com and ns2.host.com, anyone wanting information about example.com must first ask these servers. Those servers then provide the actual records like A, MX, or CNAME.
What is an A Record?
An A record (Address record) maps a domain name to an IPv4 address, which is the server’s location on the internet.
Example:
NS record:
google.com → ns1.google.com, ns2.google.comtells the world which servers hold the official DNS info forgoogle.com.A record:
google.com → 142.251.40.142gives the IP address of Google’s server.When you type
google.comin your browser, your computer asks the NS servers, gets the A record, and connects to142.251.40.142.
What is an AAA record?
An AAA Record maps a domain name to an IPv6 address. It’s essentially the IPv6 version of an A record.
Example:
NS record:
google.com → ns1.google.com, ns2.google.comtells the world which servers hold the DNS info forgoogle.com.AAAA record:
google.com → 2607:f8b0:4006:820::200egives the IPv6 address of Google’s server.When you type
google.comin your browser, your computer asks the NS servers, gets the AAAA record, and connects to2607:f8b0:4006:820::200e.
What is CNAME Record?
A CNAME record (Canonical Name record) allows one domain name to point to another domain name instead of directly pointing to an IP address . It’s like an alias — when someone visits the first domain, the DNS system looks up the second domain to get its IP.
Example:
NS record:
google.com → ns1.google.com, ns2.google.comtells the world which servers hold the official DNS info forgoogle.com.CNAME record:
www.google.com → google.commakeswww.google.coman alias ofgoogle.com.When you type
www.google.comin your browser, your computer asks the NS servers, sees the CNAME, then looks upgoogle.com’s A or AAAA record, and connects to the corresponding IP.
What is an MX Record?
An MX record (Mail Exchange record) is a DNS record that tells the internet which mail server should receive emails for your domain.
It direct email traffic to the correct server for your domain. Without an MX record, other servers won’t know where to deliver your emails.
Example:
MX record:
google.com → ASPMX.L.GOOGLE.COMdirects emails sent to@google.comaddresses to Google’s mail server.When someone sends an email to
user@google.com, their mail server asks the NS servers, gets the MX record, and delivers the email toASPMX.L.GOOGLE.COM.
What is a TXT Record?
A TXT record (Text record) is used to store arbitrary text information about a domain. It’s commonly used for verification, authentication, and other extra data that doesn’t fit into A, AAAA, CNAME, or MX records.
Example:
TXT record:
google.com → "v=spf1 include:_spf.google.com ~all"is used to verify that Google’s servers are allowed to send emails for the domain.When someone sends an email from
@google.com, the recipient’s mail server can check the TXT record to confirm it’s coming from an authorized server.
How all DNS records work together for one website?
NS records
google.com → ns1.google.com, ns2.google.comTells the world which servers hold the official DNS info for the domain. Every query starts here.
A & AAAA records
google.com → 142.251.40.142(A record, IPv4)google.com → 2607:f8b0:4006:820::200e(AAAA record, IPv6)Provide the actual IP addresses that browsers connect to when visiting the website.
CNAME records
mail.google.com → google.comCreates an alias so subdomains can point to the same server without needing separate A/AAAA records.
MX records
google.com → ASPMX.L.GOOGLE.COMDirect emails sent to
@google.comaddresses to Google’s mail server.
TXT records
google.com → "v=spf1 include:_spf.google.com ~all"Provides verification and security information, like which servers can send email for the domain.


