DNS Record Types Explained

How does a browser know where a website lives?
- when we open any website on our browser, the browser does not magically know where that website is stored. computer do not understand human-friendly names like “chaicode.com“ they only understands IP address, which looks like this
192.168.10.1. which is very hard to remeber for a human, So the very first thing our browser need to figure out is where this website actually lives on the internet , to solve this problem DNS came into the picture let’s deep dive into it.
DNS : The Big Phonebook of the Internet
DNS stands for Domain Name System . The simplest way to understand it is to think it as the phonebook of the internet
Computer only understands Numbers (ip addresses).
Human are able to remember the names of the website not the ip address (like
chaicode.com)
DNS bridges this gap by automatically translating the name you type into the numbers that computer understand

without DNS , we have to remeber the ip address of each website to access it which is practically not possible for a human to remember all the ip addresses, hence DNS made our task very easy that why we just have to type the website names to get its access.
Why we need DNS records?
simple answer is without these records we have to remember the ip address to access the website , basically they tell the internet where to find a website
DNS isn’t just one big list. It is a collection of specific records, where each record answers a specific question about a domain.
Different DNS records :
NS Record (Name Server)
NS records tells the internet to determine which name server is authoratative for a particular domain;. In simpler terms, if we buy a domain name for website from any provider like shubhujalablogs.live , the NS recors tells us which company owns or manage that domain , it points the name server of that company then the name server provides the IP address of the website. (in my case it is cloudflare).
- Question it answers : Who is incharge here?
A Record
A record also known as address record, it is used to map the domain name directly to an IPv4 address

- Question it answers : where is the website hosted?
AAAA Record
It is introduced because we actually ran out of standard IPv4 address, IPv6 was created to solve this problem . AAAA record does the same job as the A record but for the IPv6 address.

- Question it answers : where the website hosted? for IPv6 networks
CNAME Record
Some time we want multiple names to point to the same location , basically CNAME acts as a nickname . Instead of pointing to an IP address (like A record), CNAME points to another domain name, it basically says “I don’t know the IP, but you can ask the this guy“
- Question it answers : is this alias for another domain?
MX Record
if you send an email , the internet is going to look for the MX Record. for browser it was A record, MX records often have priorities (number like 20,30). lower the number, higher the priority.
- Question it answers : where should email be delievered?
TXT Record
TXT records are like sticky notes attached to your domain they provides information, mostly used for the security and verifications.
Example → v= spf1 include:_spf.google.com ~all
it allows specific mail servers to send emails for the domain.
So , these are all the common records and there usescases
Hope you enjoyed reading.