Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained

Published
4 min readView as Markdown
DNS Record Types Explained

How does a browser know where a website lives? It DNS , the phonebook of the internet , which converts names like “example.com” into IP addresses which is eventually used by the computers .

What DNS is

DNS stands for Domain Name System and converts human friendly names ( like “google.com” )(Domain Names ) into IP addresses . IP addresses are used by computers to find the location . When you type “google.com” , your browser asks DNS to find the exact location of the input .

REAL-LIFE ANALOGY : You save your mother’s name with the phone numbers . so mother’s name is for humans and phone number is for mobile phones for the call .

Why DNS records are needed

Computers understands numbers ( IP addresses(123.456.789)) and human understands easy names . DNS lets humans use easy names , while computers still gets the numeric address . Records are like sticky notes in that phonebook telling different services what to do—without them, domains are just names with no directions for web pages, email, or verification.


What an NS Record is (who is responsible for a domain)

NS (Name Server) tells the internet which server is responsible for a domain’s DNS records. In simple words “Who knows the IP address of this website?” . If DNS is a phonebook, then
NS is the person who owns that phonebook and gives correct numbers. It states that this domains phonebook is at “ns1.example.com” . NS points to servers that holds all other records , without it , no one knows where to ask for details .

What an A Record is (domain → IPv4 address)

An A Record maps a domain name to an IPv4 address (4 number address).

Domain Name : “Example.com”

IPv4 address : 123.456.789.123

Browsers need a numeric IP to connect, so if a website is on a server at that IP ,DNS uses the A record to find the server.

What an AAAA Record is (domain → IPv6 address)

An AAAA Record maps a domain name to an IPv6 address (newer IP version)(hexadecimal address).

Domain Name : “exmaple.com”

IPv6 address : 2606:2800:220:1:248:1893:25c8:1946

AAAA handles newer, longer IPv6 addresses like "2001:db8::1"—same job as A but for modern networks avoiding IPv4 shortages. AAAA ensures fast access for future-proof users; many sites have both A and AAAA.

What a CNAME Record is (one name pointing to another name)

CNAME (Canonical Name) Record creates an alias from one domain name to another domain name. Instead of pointing to an IP address, it points to another domain. CNAME says "this name points to another name," like "www.yourapp.com yourweatherapp.com"—no IP needed. It hosts files at the main domain, let "blog.yourapp.com" CNAME to it; great for subdomains without duplicating servers.

What an MX Record is (how emails find your mail server)

MX (Mail Exchange) Record tells the internet which mail server should receive emails for a domain. IF someone sends an email to user@example.com , the MX record says “forward this email to mail sever . “ Mx record gives the address of the email server for a domain .

  • NS VS MX record : NS tells who manages the domain’s DNS records. It says: “Which server knows everything about this domain?” and MX tells where emails for the domain should be delivered. It says : “Which server receives emails for this domain?”

What a TXT Record is (extra information and verification)

TXT (Text) Record stores text information for a domain in DNS. It is mainly used to prove ownership, improve email security, and add verification details. In simple words: TXT record = extra information or instructions about your domain.

TXT holds free-form text like "v=spf1 include:_spf.google.com ~all" for email spam checks or "google-site-verification=abc123" to prove you own the domain. Solves trust: verify for Google Workspace on your career guidance site or add security proofs without affecting web/email.

How all DNS records work together for one website

For a website like mywebsite.com, all DNS records work together to make the site and emails function properly. The NS record tells the internet which DNS server manages the domain. When someone opens www.mywebsite.com, the CNAME record points www to the main domain, and the A or AAAA record provides the actual IP address of the web server so the website can load. If someone sends an email to contact@mywebsite.com, the MX record directs the email to the correct mail server. Meanwhile, TXT records store verification and security information, such as proving domain ownership and preventing fake emails. Together, these DNS records ensure the website opens correctly, emails are delivered, and the domain remains secure.