Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained

Published
4 min read
DNS Record Types Explained

1. What DNS is (explained in very simple terms)

DNS (Domain Name System) translates a website name, such as google.com, into its IP address, like 142.250.190.14, enabling computers to connect to the appropriate server efficiently.

In other words:
DNS functions similarly to the Contacts app on your mobile device. When you need to find someone's phone number, you search for their name to retrieve the number. Similarly, DNS searches for a website name and provides its IP address.

2. Importance of DNS Records

DNS records are essential because they specify:

  • The location of a website

  • The server being utilized

  • The service operating at a particular location

In the absence of DNS records:

  • Websites would be inaccessible

  • Emails would fail to function

  • The Internet would be unable to route data correctly

3. What is an NS Record

An NS Record (Name Server Record) is a DNS entry that indicates where all the DNS records of your domain are stored and which server is managing them.

Who is responsible for a domain

The entity that controls the NS Records has authority over the domain.
They determine:

  • Where the website will be hosted

  • Which server will manage emails

  • Which services the domain will be connected to

4. What an A Record is (domain → IPv4 address)

  • A Record stands for Address Record.

  • It connects a domain name to a server’s IPv4 address.

In simple words:
When a user types a domain name, the A Record tells which IP address (server) the user should be sent to.

Example:
When someone opens google.com, they are sent to the server with IP address 192.168.1.1.

Without an A Record:

  • The website will not open

  • The domain will not know which server to go to

5. What an AAAA Record is (domain → IPv6 address)

An AAAA Record works like an A Record, but it is more advanced.

  • A Record: Domain/hostname → IPv4 address

  • AAAA Record: Domain/hostname → IPv6 address

IPv4 can create only about 4 billion unique address combinations.
IPv6 can create about 340 undecillion unique combinations.

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

CNAME stands for Canonical Name Record.
It is a type of DNS record that points one domain name to another domain name.

Example:
Suppose your main domain is youtube.com and you want www.youtube.com to open the same website.

In this case:

When a user types www.youtube.com:

  • DNS first checks the CNAME

  • Then it uses the A Record of youtube.com to find the actual IP address

7. What is an MX Record

MX stands for Mail Exchange.
It is specially used for email delivery.

When someone sends you an email like:
user@yourName.com

The sender’s mail server checks the MX record of your domain.
The MX record tells:

  • The exact name of the mail server (like mail.yourName.com)

  • The priority number (which server should be tried first)

8. What is a TXT Record

TXT means Text Record.
It's like a notepad in DNS where an admin can store any text:

  1. Domain ownership verification

  2. Email spam prevention

Originally, it was mainly for notes.
Now it's mostly used for:

  • Domain ownership verification

  • Email spam prevention

Extra uses and verification:

Domain verification
Services like Google Workspace and Cloudflare say:
“Add this unique code in a TXT record”
to prove that the domain belongs to you.

Email security

  • SPF Record: Tells which servers are allowed to send emails from your domain

  • DKIM: Verifies the digital signature of an email

  • DMARC: Sets policies using SPF and DKIM together

9. How all DNS records work together for one website

DNS records work like a team.
Each record has its own role, and together they keep:

  • Websites

  • Emails

  • Security
    running smoothly.

(Using A + CNAME)
When a user types www.youtube.com:

  1. The browser first follows the CNAME:
    www.youtube.com → youtube.com

  2. Then it checks the A Record of youtube.com:
    youtube.com → 192.0.2.1

  3. The IP is found → the website loads.

(Using MX + TXT for Email)

For sending an email:

  • The sender’s server checks the MX record:
    example.com mail.example.com (priority 10)

  • It checks TXT records (SPF, DKIM, DMARC) to prevent spam

  • It connects to the MX server using SMTP

  • The email is delivered successfully


DNS Record Types Explained