Understanding Different Types of DNS Records
What DNS is
do u got an question in your mind how the actually google finds your request or websites,this question is common because there is lots of websites in internet so how google knows this exact which website to be displayed.
so here comes dns .
dns stands for domain name server its map ip address to its domain name of particular webite.
its like an phonebook of internet.
so how exactly browser find your website lets understand :
When you enter google.com in your browser, the browser does not know the IP address of google.com.
To find the IP address, the browser sends the request to a DNS resolver. The resolver takes the browser’s request and first contacts a Root DNS server.
The Root server tells the resolver that it should query the TLD (Top-Level Domain) server. There are many TLDs that classify domain names, such as .com, .in, .org, etc.
The TLD server then provides the address of the Authoritative DNS server. The Authoritative server is the server that holds the actual IP address of google.com.
This IP address is then returned to the browser. Using this IP address, the browser sends a request to the server and receives the website.

Why DNS records are needed
DNS records are needed because the internet works on IP addresses, not domain names, and DNS records act like an address book and instruction set for the internet. They tell browsers where a website is hosted, how emails should be delivered, and which servers are responsible for a domain. Without DNS records, a domain name would have no meaning, websites would not load, emails would fail, and internet services would not know how to reach the correct server.
What an NS Record is (who is responsible for a domain)
An NS (Name Server) record tells the internet which DNS servers are responsible for a domain.
It defines who has authority to answer DNS queries for that domain, meaning when someone requests information about the domain (like its IP address), the DNS system knows which name servers to ask.
What an A Record is (domain → IPv4 address)
An A (Address) record maps a domain name to an IPv4 address.
It tells browsers and DNS resolvers the exact IP address of the server where the website for that domain is hosted.
What an AAAA Record is (domain → IPv6 address)
An A (Address) record maps a domain name to an IPv4 address.
It tells browsers and DNS resolvers the exact IP address of the server where the website for that domain is hosted. An AAAA record tells the internet the IPv6 address of your website,IPv6 provides much larger address space.
Think of it Like This
Domain name → Person’s name
IPv6 address → Person’s full home address
A or AAAA record → Contact saved in your phone
What a CNAME Record is (one name pointing to another name)
A CNAME (Canonical Name) record lets one domain name point to another domain name instead of an IP address
Why CNAME Records Are Used
To avoid managing multiple IP addresses
To point subdomains to a main domain
To easily change servers in one place
example-
In services like Hashnode, instead of assigning a separate IP address to every user, they use a CNAME record. Your domain points to Hashnode’s main domain, and Hashnode manages the actual IP address behind it. If Hashnode changes their server IP, users don’t need to update anything—the CNAME automatically follows the new IP.
blog.yoursite.com → hashnode.com → IP address
What an MX Record is (how emails find your mail server)
An MX record defines which mail server handles emails for a domain, helps email systems find the correct destination, supports email services like Gmail or Outlook, and ensures reliable delivery using server priorities.
example:
Think of email like postal mail:
Email address →
user@example.comDomain →
example.comMX record → Address of the post office that handles mail for that domain
When someone sends you an email, the email server checks the MX record to know where to deliver the message.
MX Records Work Flow:
Someone sends an email to
user@example.comThe sender’s mail server looks up the MX record for
example.comThe MX record returns the mail server address
The email is delivered to that serve
What a TXT Record
A TXT (Text) record stores extra information about a domain and is mainly used for verification and security purposes.
Think of a TXT record like a note attached to your domain.
It doesn’t point to an IP address
It provides instructions or proof of ownership
Other services read this note to verify or configure your domain
example:
Google asks you to add a TXT record
You add it in DNS
Google checks it to confirm you own the domain
How all DNS records work together for one website
All DNS records work together like a team, where each record has a specific job to make sure your website and email services work correctly.
Step-by-Step Flow
NS Record
Tells the internet which name servers are responsible for your domain.A / AAAA Record
Maps your domain name to the server’s IP address (IPv4 or IPv6) so browsers know where to connect.CNAME Record
Allows one domain name (likewww.example.com) to point to another domain name, avoiding direct IP usage.MX Record
Directs email traffic to the correct mail servers for your domain.TXT Record
Provides verification and security information, such as proving domain ownership and protecting emails.
example:
Example: myblog.com
Imagine you own a blog called myblog.com. Here’s how DNS records help it work:
NS Record –
Says: “The authoritative DNS servers for
myblog.comarens1.hosting.comandns2.hosting.com.”This tells the internet where to look for your domain’s DNS info.
A Record –
Says: “
myblog.comlives at IP address192.168.1.10.”When someone types
myblog.com, the browser knows which server to reach.
AAAA Record –
- If someone uses IPv6: “
myblog.comalso lives at2001:0db8:85a3::8a2e:0370:7334.”
- If someone uses IPv6: “
CNAME Record –
You want
www.myblog.comto go to the same site.Says: “
www.myblog.com→myblog.com”Now both URLs work without duplicating IP info.
MX Record –
You want email like
hello@myblog.com.Says: “Mail for
myblog.comgoes tomail.myhosting.com.”
TXT Record –
- For verification: “Google Search Console, SPF, or DKIM info here to prove domain ownership and protect emails.”
