Skip to main content

Command Palette

Search for a command to run...

DNS Record Types explained to a Hooman

Updated
6 min read

Routers get DNS record and work according to them very well, them fancy telephone directories. But we are not routers, we’re Hoomans (it’s Humans).

This article is your go-to if you are new to domains, hosting, starting an agency, or creating your own little world to show to the REAL world. Because you got to know, how your website is managed over the servers of the Internet.

What is DNS?

DNS, or Domain Name System, is the telephone directory of the Internet.

We hoomans are good at remembering names like google.com, amazon.in, sukanta.dev.

and computers only good at understanding their corresponding server addresses, which is an IP address which looks like this:

142.250.183.14

Hoomans, store our friends fam and professional contacts associated with names inside our phone. But how to store our website names associated with their server addresses like that, and who will store it?

DNS is the solution, it is a system that translates human-friendly names into computer-friendly addresses.

And there are DNS servers placed all over the world to store that website to server records, like a telephone directory.

So when we type chaicode.com to our browser, our computer asks the DNS:

Hey, I have this name. Whose name is it?

DNS replies with an address, there are several steps involved, but all those discussed in my other article, but check after you finish reading this.

Why DNS are needed?

You should not have this question after reading the previous section. But some of you will have it, so here we are.

DNS is not one big database with one answer per domain. That would be too simple and too fragile.

Instead, DNS stores records. Each record answers a specific question:

  • Who is responsible for this domain?

  • Which server hosts the website?

  • Where should emails be delivered?

  • Is this domain allowed to send email?

  • Is this domain owned by this service?

Each DNS record is a rule or fact about a domain.

Think of DNS records as index cards in a filing cabinet. One card says who’s in charge, another says where the website lives, another says where emails go. Together, they describe how the domain behaves on the internet.

NS Record (who is responsible for a domain)

NS (Nameserver) record answers this simple question:

Who is in charge here?

In other words, Which DNS servers are authoritative for this domain?

When the internet looks up chaicode.com, it eventually reaches a point where it must ask:

Which servers are allowed to answer questions about this domain?

The NS record provides that answer.

chaicode.com -> ns1.cloudflare.com

This tells the world:

If you want the truth about chaicode.com, ask Cloudflare’s name servers.

There are several nameservers other than cloudflare, but it is one of the largest of ‘em.

Without NS records, DNS would be chaos. Everyone would answer differently, and nothing would be trustworthy.

A Record (Domain → Server IPv4 Address)

A stands for Address. An A record maps:

chaicode.com (domain name) -> 141.169.2.6 (IPv4 address)

This is the most basic and important DNS record for websites.

When you visit a site, the browser usually ends up asking:

What IP address should I connect to?

The A record gives the answer.

If your website doesn’t load, nine times out of ten, something is wrong with the A record.

AAAA Record (Domain → Server IPv6 Address)

AAAA is not a typo. It’s four A’s because IPv6 addresses are much larger.

An AAAA record maps:

chaicode.com (domain name) -> (2606:2800:220:1:248:1893:25c8:1946) IPv6 address

Why does this exist?

Because the internet is running out of IPv4 addresses. IPv6 is the long-term solution.

Modern systems prefer IPv6 when available. If both A and AAAA records exist, the client usually tries IPv6 first, then falls back to IPv4.

You don’t need AAAA records, but the future definitely does.

CNAME Record (Domain pointing another Domain)

CNAME stands for Canonical Name.

A CNAME record does not point to an IP address.
It points to another domain name.

Example:

www.sukanta.dev -> sukanta.dev

This means:

“www.sukanta.dev is just another name for sukanta.dev”

Why is this useful?

Because it avoids duplication. If the IP address changes, you update it in one place, and all CNAMEs follow automatically.

Common use cases:

  • www pointing to the root domain

  • Subdomains pointing to SaaS platforms

  • Aliases for services you don’t control directly

One important rule:
A CNAME cannot coexist with other records at the same name. It replaces them.

MX Record (Emails finding your Mail Server)

MX stands for Mail Exchange.

MX records answer this question:

“Where should emails for this domain be delivered?”

Example:

sukanta.dev -> mail1.google.com (priority 10)
sukanta.dev -> mail2.google.com (priority 20)

When someone sends an email to contact@sukanta.com, the sending mail server:

  1. Looks up the MX records

  2. Tries the lowest priority number first

  3. Falls back if that server is unavailable

MX records make email resilient. If one mail server is down, another can take over.

No MX record means no email delivery, even if your website works perfectly.

TXT Record (Extra Info and Verification)

TXT records store arbitrary text.

Originally, they were meant for notes. Today, they are one of the most powerful DNS record types.

TXT records are commonly used for:

  • Domain ownership verification

  • Email authentication (SPF, DKIM, DMARC)

  • Security policies

  • Service configuration

Example:

sukanta.dev -> "v=spf1 include:_spf.google.com ~all"

This tells the world:

“These servers are allowed to send email on behalf of this domain.”

TXT records are how services confirm:

“Yes, you actually own this domain.”

They look boring. They are not.

All DNS Records Working together

Let’s walk through what happens when someone:

  • Visits your website

  • Sends you an email

Visiting your website

  1. The browser asks DNS who is responsible → NS record

  2. It asks the authoritative server for the IP → A / AAAA record

  3. If using www, DNS follows the alias → CNAME

  4. The browser connects to the IP address

  5. The website loads

All of this happens in milliseconds.

Sending you an email

  1. The sender’s mail server looks up MX records

  2. It connects to the correct mail server

  3. It checks TXT records to verify legitimacy

  4. The email is accepted (or rejected)

Different records. Same system. One coordinated dance.

The Big Picture (not Big Boss)

DNS is not magic. It’s structured, layered, and surprisingly elegant.

Each record type does one job, but together they answer a bigger question:

“How does this domain behave on the internet?”

Once you understand DNS records, a lot of things suddenly make sense:

  • Why websites fail after “just one small change”

  • Why email setups are fragile

  • Why DNS changes take time to propagate

DNS is slow on purpose, boring by design, and absolutely foundational.

The internet rests on it; quietly, constantly, and without asking for credit.