DNS Record Types Explained
Discover the Basics of DNS and Its Different Record Types
What is DNS record?
A DNS (Domain Name Server) is like a internet phonebook which converts general human readable websites names (like example.com) convert into a machine language Ip address to redirect the any specific website in your system.
In a Phone directory:
you save phone number: Mom → 9711xxxxxx
DNS saves : google.com → 142.250.195.206

Need of DNS (Domain Name Server)
Without Domain Name Server you would really need to remember IP address of each and every website to access them, but DNS converts human readable web names into IPs.
DNS records have where is the websites hosted, who control the domains, is the domains verified.
Types of DNS Records

What is a NS Record?
NS (Name Server) it consist information about the domain. NS record directs you to domain not directly to any IP address. Example:
example.com = ns1.cloudflare.com
example.com = ns2.cloudflare.com
In this Cloudflare manages all DNS for this domain.
Real Life Analogy: Register your house but Municipal office keeps the official records.
What is A (address) Record?
A record stands for address and its purpose is to map a human readable domain to a IPv4 address.

What is AAAA Record?
Its same as A (address) record but its purpose is to map a human readable domain to IPv6 address.
It solves the problem of exhaustion which is in the IPv4.
example.com→ 2606:2800:220:1:248:1893:25c8:1946
What is a CNAME Record?
CNAME Record stands for canonical name is a type of DNS record that acts as an alias, pointing one domain name (like blog.example.com) to another "true" domain name (like example.com), rather than directly to an IP address.
Analogy:
Nickname → Real name
"Papa" → "Rajesh Sharma"
What is MX Record?
MX Record in DNS stands for mail exchange its responsibility is to direct emails for a domain to the correct mail server. MX routes mail based on priority numbers The priority order is: lower number = high performance
Lets take an example of domain: google.com
@ MX 10 mailhost1.com (Priority 1st)
@ MX 20 mailhost2.com (if 1st mail route fail then only it will transfer)
In mail1 lower number 10 means high priority so in case if mail1 fails the mail2 will be deliver. Now you may think what’s the issue if second mail will be delivered but the main issue are:
Your email reaches late.
Sometimes delayed by minutes or hours
For OTPs, login links, payment mails → this is serious.
Emails may go to the spam section.
To resolve this the email service could also configure this MX record so that both servers have equal priority and receive an equal amount of mail:
@ MX 10 mailhost1.com
@ MX 10 mailhost2.com

What is TXT Record?
TXT record is a type of text record that stores human readable or machine readable text generally written in double inverted commas. EX: “My name is PP”. This record is mainly used for verification and also a important part for the prevention of mail spoofing or phishing by authenticating senders.
How it Works:

How all DNS records work together for one website
