How does the browser know where the website lives? Machines understand numbers, not words or letters, so how does the browser know where to fetch the data of a website?
This is where DNS comes in. DNS means Domain Name System. It’s just a collection of servers that provide the browser with the IP address of any website. Think of it as a phone book of the internet. To learn more about the DNS and how the DNS manages to find the IP address of a website, read this blog.
Up until now, we understood that DNS is a phonebook. Then who are actually writing this phonebook? The answer is you, when you buy a domain from a provider(e.g. Hostinger, GoDaddy or NameCheap), there in the Admin panel where you have to mention your configuration of the DNS.
Deep dive into DNS records
DNS records are the instruction that lives in the Authoritative server that provide information about the domain name and its IP address. Its has all the configuration that handles DNS request.
There are a lot of records, but we will focus on some of the important records that are - A, NS, CNAME, AAAA, MX and TXT
Understanding DNS records with real life scenario.
A Record
A Record or Address record is used to create a direct communication between the Domain name and its IPv4 address. This record is the simplest of all the records.
Imagine A record as the Name and the Phone number in a mobile phone contact app. In your contact app when you search for the name there mobile number appears similarly its provides the IP directly.
CNAME Record
A CNAME record or Canonical Name Record directs an alias domain to a canonical domain. It means this is a type of record used to link one domain to another. Just like giving the domain a nickname. This record is generally used for creating subdomains.
Imagine this: you have two websites hosted on the same server. For example:- “example.com” and “www.example.com”. Instead of creating two A records for each domain, create an A record for the root domain and for the subdomain, add a CNAME record that points to “example.com”. So now what happens is when you type “www.example.com” in the browers the DNS will get the CNAME record of value “example.com” and then it will query example.com to get the IP address.
In case you change the IP address of your website, then you have to change the A record of the root domain only.
NS Record
NS Record or Nameserver records show which DNS server is acting as a Authoritative nameserver for your domain. Authoritative nameserver contains all the information about the domain. It contains all the different records that your domain has. Without this user will not be able to access your website.
AAAA Record
AAAA Record is just like the A record. The only difference is that it connects the domain name with IPv6, which exists because IPv4 addresses are running out. Modern networks and browsers prefer IPv6 when available, so if a domain has an AAAA record, the browser will try that first.
MX Record
MX Record or Mail Exchange Record directs emails to the domain mail server. It tells the internet which mail server should receive emails for a domain and includes priority values, where a lower number means higher priority, allowing backup mail servers to take over if the primary one fails.
TXT Record
TXT Record is a flexible type of Domain Name System record that stores human-readable or machine-readable text about a domain, primarily used for verifying ownership, email security (SPF, DKIM, DMARC), and other domain-related services, allowing administrators to add informational strings to their domain's DNS settings.


Top comments (0)