Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained

Updated
3 min read
DNS Record Types Explained

DNS (Domain Name System) is the internet’s phonebook, translating human-readable names (example.com) into machine-readable IP addresses (192.0.2.1192.0 .2 .1192.0.2.1). DNS records are essential instructions stored in zone files that tell browsers where to find websites, direct email traffic, and verify ownership.Key records include NS (who controls the domain), A/AAAA (domain-to-IP mapping), CNAME (aliases), and TXT (verification).

Why DNS Records Are Needed

Without these records, you would have to memorize complex strings of numbers for every site you visit. DNS records provide a structured way to map your domain to various services like web hosting, email, and security verification.

1. NS Record (Name Server)

The Responsibility Pointer: An NS Record tells the internet which DNS server is "in charge" of your domain.

  • Analogy: If you want to find someone in a large building, the NS record is the receptionist who tells you which directory to look at.

2. A and AAAA Records

The Home Address: These records map your domain directly to a server's IP address.

  • A Record: Maps a domain to an IPv4 address (e.g., 192.0.2.1).

  • AAAA Record: Maps a domain to the newer, longer IPv6 address.

  • Analogy: This is the physical street address of your website's "house."

3. CNAME Record (Canonical Name)

The Alias: A CNAME points one domain name to another instead of an IP.

4. MX Record (Mail Exchanger)

The Post Office: The MX Record tells the internet where to send your emails.

  • Problem it solves: Without this, emails sent to hello@mysite.com wouldn't know which mail server to enter.

  • Analogy: This is like the postal service's delivery instructions for your business's mailroom.

5. TXT Record (Text)

The Note: A TXT Record holds text information for outside services.

  • Use Case: It’s commonly used to verify you own the domain (for Google or Microsoft) or to set up email security (SPF/DKIM) to prevent spam.

  • Analogy: A note taped to your door providing a verification code for a delivery driver.

How They All Work Together

Imagine setting up a small business website. Your DNS setup might look like this:

  • NS: Points to your provider (e.g., Cloudflare or GoDaddy).

  • A: Points mysite.com to your web host's IP.

  • CNAME: Points www.mysite.com to mysite.com.

  • MX: Points to your email provider (e.g., Gmail).

  • TXT: A code to verify you own the site for search engines.

Summary

DNS records are the unsung heroes of your online presence. Each record handles a specific "department"—A for the website, MX for email, and TXT for security. Once they are all set, your domain becomes a fully functional digital hub.

More from this blog

subhajit bag

13 posts