Top 5 DNS Record Types You Should Probably Know
If you’ve ever bought a domain name or tried hosting a website, chances are you’ve run into DNS settings at some point.
And if you’re anything like me the first time I opened that page, you probably saw a bunch of records like A, AAAA, CNAME, MX, and HOST and thought:
“Okay... what exactly am I looking at here?”
DNS configuration panels can feel a bit intimidating at first because they’re full of terms that aren’t immediately obvious. But once you understand the purpose of each record type, it actually becomes pretty straightforward.
So in this post, I explain what DNS is, along with 5 of the most common record types you might find out there. Let’s go!
What is DNS?
DNS stands for Domain Name System.
The easiest way to think about DNS is that it’s the phonebook of the internet.
I am told that a phonebook was a giant book filled with people's names along with their phone numbers. This way, anybody could look someone's number up instead of having to remember every single person's phone number. That's also how DNS works, but for the modern web.
We humans prefer readable names like:
halfstackdevs.tech
google.com
wikipedia.orgBut computers communicate using IP addresses, which look something like this:
216.198.79.1So whenever you type a domain name into your browser (like halfstackdevs.tech), DNS translates that human-readable domain name into a machine-readable IP address that the computer can understand and reach on your behalf.
Without DNS, we’d all have to remember IP addresses for every website we visit.
DNS servers form a kind of organization, with each DNS server asking its "boss" up to the "CEO" (The Root Name Server) if it doesn't know about a DNS record.
Where Are DNS Records Stored?
DNS information is stored on DNS servers.
These servers maintain records that tell the internet things like:
where your website is hosted
where emails for your domain should go
whether one domain should redirect to another, and more...
These instructions are stored in DNS records, and there are several different types depending on what you want to achieve.
Let’s look at five of the most common ones.
1. A Records
A records (short for Address records) map a domain name to an IPv4 address.
For example:
halfstackdevs.tech → 216.198.79.1This tells the internet:
If someone requests for halfstackdevs.tech, send them to the server at 216.198.79.1.
This is one of the most common DNS records and is typically used to point your domain to your web server.
If you’ve ever hosted a website on a VPS or cloud server, you’ve probably configured an A record to point your domain to your server’s IP, like the example above.
2. AAAA Records
AAAA records are basically the IPv6 version of A records.
The name is A repeated 4 times, because an IPv4 address has 32 bits and an IPv6 address has 128 bits — which is 4 times as much as an IPv4 address, hence AAAA compared to A.
Instead of mapping a domain to an IPv4 address, they map it to an IPv6 address.
Example:
wikipedia.org →
2001:0db8:85a3:0000:0000:8a2e:0370:7334IPv6 addresses are much longer because they were designed to solve the problem of the world running out of IPv4 addresses.
You won’t always need to configure AAAA records yourself, but many modern services support IPv6 and may ask you to add one.
3. CNAME Records
CNAME stands for Canonical Name. (The best meaning of Canonical from the dictionary that relates to this is: accepted as being accurate and authoritative.)
Instead of pointing a domain to an IP address, a CNAME record points one domain name to another domain name.
For example:
www.halfstackdevs.tech → halfstackdevs.techWhen someone looks up www.halfstackdevs.tech, DNS will say:
Actually, go check halfstackdevs.tech instead.
The DNS lookup then continues using that new name.
CNAMEs are really useful when multiple domains should point to the same place.
For example, many services ask you to configure something like:
guesswhat.halfstackdevs.tech → guesswhat.github.ioThis lets the service manage the underlying IP addresses while your domain stays the same.
4. MX Records
MX records stand for Mail Exchange records.
These tell the internet which mail servers are responsible for receiving emails for your domain.
For example, if you set up a custom email like:
afnan@halfstackdevs.techYour MX records might point to something like:
mail.yourprovider.comWhen someone sends an email to your domain, DNS uses the MX record to determine which mail server should receive the message.
Services like:
Google Workspace
Outlook
Zoho Mail
all require you to configure MX records when setting up domain-based email.
5. NS Records
NS records stand for Name Server records.
These records tell the internet which DNS servers are authoritative for a domain and responsible for answering DNS queries about it.
In other words, NS records answer the question:
Who should I ask for the DNS records of this domain?
For example, when you register a domain, your registrar might automatically assign name servers like this:
ns1.provider.com
ns2.provider.comYour domain’s NS records would then point to those servers.
So when someone tries to visit:
halfstackdevs.techThe DNS system first checks the NS records to determine which DNS servers contain the records for that domain.
Once it finds those name servers, it asks them for the rest of the DNS records — like the A record or CNAME record that tells the browser where the website is actually hosted.
You’ll often encounter NS records when:
Changing DNS providers (for example moving who manages your DNS from GoDaddy to Cloudflare)
Delegating subdomains
Setting up custom DNS infrastructure
When you change the nameservers of a domain, you’re essentially saying:
From now on, these servers are responsible for answering all DNS questions about my domain.
And that’s why updating nameservers can sometimes take time to propagate — the rest of the internet needs to learn which DNS servers now hold the authoritative records for your domain.
BONUS: HOST Records
This one is a bit interesting.
Host records aren’t actually part of the official DNS specification.
Instead, they’re a convenience feature provided by many DNS management tools.
A HOST record typically combines multiple DNS entries (like A records and metadata) into a single logical entry for a “host”.
DNS management systems, DHCP servers, and IP management tools often use them to simplify configuration.
So while you might see HOST records in certain dashboards, they’re usually just a simplified abstraction of other DNS record types.
Final Thoughts
DNS can feel complicated when you first encounter it, but the core idea is actually pretty simple.
It’s just a system that translates domain names into the information computers need to communicate with each other.
And most of the time, when you’re configuring DNS, you’re just using a handful of record types:
A records → point domains to IPv4 addresses
AAAA records → point domains to IPv6 addresses
CNAME records → point one domain to another
MX records → tell email where to go
NS records → changing who manages your DNS
Once you understand these, managing domains becomes a lot less mysterious.
Thanks for reading!
Please let me know what you thought about this post, you can find me on my socials below :)