Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained Simply

Published
3 min read
DNS Record Types Explained Simply

Have you ever wondered how your browser knows where a website lives?

When you type google.com, Your computer somehow finds the exact server among millions of servers on the internet. How does this happen?

The answer is DNS and DNS records.

Let’s understand this in the simplest way possible.

What is DNS?

DNS stands for Domain Name System.

It works like the phonebook of the internet.

Just like you save a friend’s name and phone number in your phone:

  • Name → John

  • Phone number → 9876543210

Similarly, DNS connects:

  • Domain name → google.com

  • IP address → 142.250.183.206

Computers use IP addresses, but humans remember names. DNS connects the two.

Why DNS Records Are Needed

DNS records are like instructions that tell the internet different things about your domain.

They answer questions like:

  • Where is the website server?

  • Where should emails go?

  • Which server is responsible for this domain?

  • Is this domain verified?

Each type of DNS record solves a specific problem.

1. NS Record (Name Server Record)

Purpose: Tells which server is responsible for your domain.

Think of it like the main office handling all information about your domain.

Example:

example.com → ns1.hosting.com
example.com → ns2.hosting.com

This means these servers manage all DNS records for example.com.

2. A Record (Address Record)

Purpose: Connects a domain name to an IPv4 address.

This tells browsers where your website lives.

Example:

example.com → 192.168.1.1

Problem it solves: Helps users open your website.

3. AAAA Record (IPv6 Address Record)

Purpose: Connects a domain name to an IPv6 address.

IPv6 is the newer version of IP addresses.

Example:

example.com → 2001:0db8:85a3::8a2e:0370:7334

Problem it solves: Supports modern internet infrastructure.

4. CNAME Record (Canonical Name Record)

Purpose: Points one domain name to another domain name.

Example:

www.example.com → example.com

This means both open the same website.

Problem it solves: Avoids managing multiple IP addresses.

5. MX Record (Mail Exchange Record)

Purpose: Tells where emails should go.

Example:

example.com → mail.google.com

Problem it solves: Ensures emails reach the correct mail server.

Without MX records, emails won’t work.

6. TXT Record (Text Record)

Purpose: Stores extra information for verification and security.

Example:

example.com → "google-site-verification=abc123"

Problem it solves:

  • Domain verification

  • Email security

  • Ownership proof

How All DNS Records Work Together

Let’s say you open:

www.example.com

Here’s what happens:

  1. NS record tells which server manages the domain

  2. A record gives the website IP address

  3. CNAME may redirect to another domain

  4. MX record handles emails

  5. TXT record verifies domain ownership

Together, they make the website and email work properly.

Real-Life Analogy

Think of DNS like a company:

  • NS record → Manager

  • A record → Office address

  • CNAME → Nickname

  • MX record → Mail department

  • TXT record → ID verification

Each has a role.

DNS records are essential for making websites and emails work.

The main records you should know are:

  • NS → Responsible server

  • A → Website IP address

  • AAAA → IPv6 address

  • CNAME → Domain alias

  • MX → Email server

  • TXT → Verification and security

Without DNS records, the internet wouldn’t function properly.