Skip to main content

Command Palette

Search for a command to run...

DNS Record Types

Published
4 min read

“How does a browser know where the website is?”

This is where DNS comes into view

What is DNS?

  • DNS: Domain Name System.

  • DNS is the one that turns a website name into a name that the computer understands. So, basically, DNS is a translator between them.

  • Example: When we type: Google.com
    The computer understands: 148.55.66.77
    Think of DNS as a phonebook, you search for a name, and DNS provides the number.

Why is DNS needed?

  • It converts the website names that we know to the IP addresses that the computers know.

  • DNS records store the information about its domain, IP’s, email server, and other services.

  • They help us answer questions like:

    1. Where is the website hosted?

    2. Who owns this domain?

    3. Where should the email be delivered?

  • Example:

    1. Your house name: The domain name

    2. Your house address: The IP address

    3. The DNS record: All details related to your house(Who lives here, where do the mails go, etc.)

  1. NS Record (Name Server)

  • Role: The NS record tells the Internet which server is responsible for managing the domain

  • Why needed: Without it, no one would know where to look for the information about your domain.

  • Analogy: The city registration office keeps a record of every house in the city, so when you get a letter, the mailman goes to the city registration office to find your exact home address.

  1. A Record (Address)

  • Role: An A record connects the domain to the IP address- IPv4

  • Why needed: An A record is needed to map a domain name to an IP address so browsers can locate and connect to the website.

  • Analogy: Your house’s street address for the mailman

  1. AAAA Record

  • Role: AAAA records do the same job as an A record, but use IPv6 (Newer version of the IP).

  • Analogy: New way of telling the street address

  • Think of it like this,
    A Records = Millennials (Reliable, widely used, and built on IPv4. Most of today’s websites still depend on it.)

    AAAA Records = Gen-Z (Newer, future-ready, and based on IPv6 — created because the internet ran out of IPv4 addresses.)

  1. CNAME Records (Canonical name)

  • Role: Points one domain name to another domain name (alias)

  • Analogy: A nickname or alternate name for the same house.

    - Your house has one real street address, but it may also be known by a nickname like “ Blue House” or “Doctor’s House.”
    When someone uses the nickname, the city office redirects them to the same real street address.

  • The common confusion:
    A record = direct IP

    CNAME = indirect, uses the A record’s IP

  1. MX Records (Mail Exchange)

  • Role: MX record tells the internet which Mail server should receive the emails for a particular domain.

  • Analogy: Address of the post office for your region

  • MX records point to a hostname, not to an IP address.

  • Example: If someone sends an email to info@example.com, MX records guide the mail to the correct server.

  • The common confusion:

    NS (Name Server) records tell the internet who is responsible for a domain’s DNS information (It can be any record)
    MX (Mail Exchange) records tell the internet where emails for the domain should be delivered.
    NS: Who manages the domain

    MX: Where emails go

  1. TXT Records

  • Role: TXT records store text information used for domain verification, security, and trust.

  • They help:

    -Prove that you own a domain

    -Protect your domain from email spoofing

    -Allow trusted services to use your domain

  • Analogy: Think of a TXT record as a notice board outside your house. (Which mails are accepted, who can deliver, etc.)

How all DNS Records work together?

When you type www.example.com

  • The browser asks the NS record: “Who knows about “example.com?”

  • NS points to the server with the official info.

  • The browser checks the A or AAAA record to find the website IP.

  • Website loads.

  • Emails use MX records.

  • TXT records verify domain ownership or security rules.

So basically think of DNS as a team, who comes to tegether to help browser find the website.

Final Thoughts

DNS might sound technical, but it’s really just the internet’s way of finding the right place.
Just like we use names instead of phone numbers, the internet uses DNS to keep things easy.