Skip to main content

Command Palette

Search for a command to run...

DNS Records Types Explained

Published
3 min readView as Markdown
DNS Records Types Explained

What are DNS records and why are these needed?

DNS stands for Domain Name System. The easiest way to understand it is to think of it as the phonebook of the internet.If DNS is a phonebook, DNS Records are the specific lines written inside it.A real phonebook might have more than just a home number for Alice. It might list her work number, her fax number, or her mailing address. Similarly, a domain name needs to do more than just show a website. It needs to handle emails, prove ownership, or redirect traffic.

NS Record

NS stands for Nameserver.It tells the internet who is responsible for this domain.

Analogy : Think of NS records as the post office responsible for your area.
Before delivering mail, you must know which post office handles this address.

A Record

A stands for Address.It points a domain name to an IPv4 address.This is the most common record. It connects example.com to a standard IP address like 93.184.216.34.

Analogy: This is like linking your friend’s name directly to their home phone number.

AAAA Record

its called Quad-A Record. It points a domain name to an IPv6 address.The internet is running out of standard IPv4 addresses . IPv6 addresses are much longer and look like complex codes. The AAAA record does the exact same job as the A record, just for this newer, longer address format.

CNAME Record

CNAME stands for Canonical Name. It points one domain name to another domain name.

Analogy: This is like a forwarding address. If you move houses, you tell the post office, "If mail comes for my old address, please just send it to my new address."

CNAME vs A

  • A record → points to an IP address

  • CNAME → points to another domain name

MX Record

MX stands for Mail Exchange. It tells the internet where to send emails for your domain.When you send an email to any web address, the internet looks for the MX record to find out which server handles the mail. It acts like a dedicated mailbox.

TXT Record

It stands for Text Record.It holds text information for verification and security.This record doesn't direct traffic to a website. Instead, it’s used to prove you own the domain or to store instructions for other services.

How all DNS records work together for one website

  • NS Records: Tell the world that Cloudflare (or GoDaddy/AWS) is managing the list.

  • A Record: Directs users who type mycoolsite.com to the web server IP (1.2.3.4) so they see the homepage.

  • CNAME Record: Directs users who type www.mycoolsite.com to mycoolsite.com so they also see the homepage.

  • MX Record: Directs emails sent to me@mycoolsite.com to Google Workspace (or Outlook) so you can read them.

  • TXT Record: Contains a specialized code proving to Google that you actually own the domain so they let you use their email tools.

More from this blog

Web Dev Cohort

13 posts