DNS (Domain Name System)
DNS translate human readable how a domain should behave. They map a domain name to IP addresses. They help browser in finding the correct server for the website. DNS (Domain Name System) is like the phonebook of the internet.
Domain name into machine readable IP addresses so browsers can load Internet resources. Humans access information online through domain names. Each device connected to Internet has unique IP address which is used by other devices to find the device and that address is necessary to find the appropriate Internet device like a street address is used to find a particular home.
A basic question arrive to the mind of user that is How does a browser know where a website lives?
Lets discuss this here,When you type google.com in your browser, computer asks a system called DNS to help find the correct server.
Why are DNS records needed?
Which server hosts your website
Where emails should be delivered
Which service controls your domain
Extra information for security and verification
DNS Record Types
NS Record – Name Server record tells which DNS server controls your domain.
A NS record is a type of DNS record that identifies the authoritative name servers responsible for a domain's DNS zone. Without NS records, the internet wouldn’t know where to ask for your domain’s information.
In DNS:
NS Record answers:
“Which DNS service manages this domain?”
A Record – IT provide IP address. An A Record connects a domain name to an IPv4 address.
The A stands for address and this is the most fundamental type of DNS record. It indicates the IP address of a given domain. IT provide IP address. Eg: cloudflare.com return IP address of 104.17.210.9.
In DNS:
A Record connects:
Domain name → house address (IPv4)
Problem it solves:
Without A records, your browser knows the name but can’t reach the website.
AAAA Record – Domain to IPv6 address
An AAAA Record similar to an A record but use IPv6 addresses. The internet is growing, and IPv6 provides more addresses. The internet is growing fast, old addresses i.e IPv4 have limited address. We need more addresses for more devices which can solve by AAAA record making websites future-ready and accessible.
In DNS:
AAAA Record is the modern version of A record. Which provide longer address like a modern cities use detailed address format.
CNAME Record – One name pointing to another
A CNAME Record points one domain name to other domain name. Avoids duplicate configuration and keeps things simple. simple example to this In our phone, we save name as mom but actually it is Her real phone number. We always dial mom, not the number.
In DNS terms
A CNAME Record means:
One domain name is an alias (nickname) for another domain name.
for example :www.example.com is the nickname example.com is the real name
MX Record – How emails find your mail server?
An Mail Exchange Record tells emails where to go. Without MX records emails sent to your domain will never reach you. In real life example our home address is different and the mailbox is different Letters don’t go directly to your bedroom they go to the mailbox first then reach to us. MX record ensure reliable email delivery
Problem it solves:
Without MX records, emails sent to your domain will never arrive.
TXT Record – Extra information and verification
A TXT Record stores extra text information. it is used for Domain ownership and Email security. It also connect services like Google, GitHub, etc. It is useful because it prevents fake emails and proves you own the domain. It prevent loss of data and mails and secure it from spam emails also provde security.
In DNS terms
A TXT Record stores simple text information about a domain. It hold visitors and simply tells other services something important about the domain.
Problem it solves:
Prevents fake emails and proves you own the domain.