Cloudwards.net may earn a small commission from some purchases made through our site. However, any earnings do not affect how we review services. Learn more about our editorial integrity and research process.

What Are DNS Records? Explained for Beginners in 2024

The DNS system is the secret sauce that makes the internet user-friendly, yet its inner workings can be complicated. This article will help you better understand DNS records -- even if you're a complete newbie -- by answering the question: “What are DNS records?”

Aleksandar KochovskiAleksander HougenJasna Mishevska

Written by Aleksandar Kochovski (Editor)

Reviewed by Aleksander Hougen (Managing Editor)

Facts checked by Jasna Mishevska (Lead Fact-Checking Editor)

Last Updated: 2024-03-25T12:52:00+00:00

All our content is written fully by humans; we do not publish AI writing. Learn more here.

Key Takeaways: What Are DNS Records?
  1. In the simplest of terms, DNS records are a set of instructions for how to handle requests to a domain name.
  2. This data helps translate an IP address into a human-readable domain name, while also facilitating all manner of online services.
  3. Grasping the fundamentals of the different DNS record types and their roles is vital for anyone who manages websites, email providers or other web-based services.

Facts & Expert Analysis About DNS Records:

  • What Are DNS Records: DNS records are also known as zone files. They contain a comprehensive set of data for a specific domain, including record types like A, AAAA, MX and CNAME.
  • DNS Resolution: The process of translating a domain name to an IP address is known as DNS resolution.
  • DNS Queries: By accessing an online service, you send a DNS query, which triggers a DNS record lookup. This initial lookup relies on a series of recursive DNS servers that cache information from authoritative servers, speeding up future lookups.

The Domain Name System (DNS) is an essential part of how the internet functions. It translates complex numerical IP addresses into human-readable domain names, like google.com, letting us easily access websites and other online content.

DNS records are the instructions that make the DNS system work, as they decide how a request to a domain or subdomain should be handled. They serve various purposes, from mapping domain names to IP addresses, to identifying email servers and much more. Read on to learn more about what DNS records are and how they work as we dive into the most common DNS record types.

  • 03/25/2024 Facts checked

    Article rewritten with simpler language and more concrete examples to help beginners out as much as possible.

What Are DNS Records?

DNS records are data stored on authoritative DNS servers about domain names and their corresponding IP addresses, as well as the parameters used in DNS resolution. These records act as a directory, which the DNS system accesses to determine the domain’s IP address and other necessary information when a user tries to open a website or access an internet resource.

HOW DNS servers work
The DNS system’s primary purpose is to translate domain names into IP addresses.

What Are DNS Records Used For?

A domain’s DNS records play a crucial role in the following processes:

  • Matching a domain name to the correct IP address to help people access websites easily.
  • Unmatching domain names from IP addresses in cases where a site’s domain name or IP address has changed.
  • Directing email traffic to the correct mail server.
  • Enabling and facilitating all kinds of online services, such as video streaming, file transfers and online gaming.

Types of DNS Records Compared

Record Type:What Is It For?Example
AMatches a domain name to its corresponding IPv4 addressThe domain name “example.com” points to the IP address “198.102.434.8”
AAAAMatches a domain name to its corresponding IPv6 addressThe domain name “example.com” points to the IP address “2001:0000:130F:0000:0000:09C0:876A:130B”
MXPoints to receiving mail serversSending an email to “[email protected]” triggers a DNS record lookup for mail servers related to the domain “example.com”
TXTUsed for storing text notes and all other use cases that lack a dedicated record type, such as domain verification and spam preventionThe domain “example.com” is tied to the words “Hello world”
CNAMEMatches a domain name to another domain name for redirectingThe domain name “blog.example.com” is aliased onto “www.example.com”
SRVPoints to servers that host online servicesOpening the Netflix app triggers DNS lookups for Netflix’s servers
NSPoints to an authoritative name server for a DNS entryWhen accessing “example.com,” the NS record points to the appropriate DNS server hosting all relevant zone files

The Most Common DNS Record Types

While there are numerous DNS record types, some are used more than others. Here are some of the most common types of DNS records and their explanations.

What Is an A Record in DNS?

A records, or address records, are the fundamental DNS record type that maps a domain name to an IPv4 address, letting users access the website or service associated with the domain. Here are some other uses for A records:

  • Load balancing: A website typically has only one A record, though it’s not uncommon for high-traffic websites to use multiple A records pointing to different IP addresses that host identical content.
  • Email spam prevention: DNS A records also play a role in DNS-based blackhole lists (known as DNSBLs), which help mail servers block spam. 
  • Subdomain creation: A records can also create subdomains for a domain by pointing the subdomain to the correct IP address.
  • Redirection: An A record can be used to point one domain or subdomain to another one.
  • DNS record example: An A record for the domain name “example.com” points to the IP address “198.102.434.8.”

What Are AAAA DNS Records?

As the internet grows, the pool of available IP addresses shrinks. IPv6 addresses were invented to solve this issue. They are more complex and offer more combinations than IPv4 addresses. The pool of IPv4 addresses totals 4,294,967,296 — around 4.3 billion. In contrast, the total number of possible IPv6 addresses is 340 undecillion (that’s 3.4 followed by 38 zeros).

An AAAA record is very similar to an A record, but it’s used for the newer IPv6 addresses. IPv6 is gaining traction — it already represents around 45% of all Google traffic — and AAAA records will become increasingly important as IPv6 adoption grows. 

AAAA records are only used when the website has an IPv6 address and the user’s device supports IPv6. Otherwise, they are used in all the same ways as A records.

  • DNS record example: An AAAA record for the domain name “example.com” points to the IP address “2001:0000:130F:0000:0000:09C0:876A:130B.”

What Are ANAME & CNAME Records?

A CNAME record (canonical name record) is used to map one domain name onto another. This is known as aliasing, which is why this record type has a variant called an ANAME record, or alias name record.

ANAME records address some of the CNAME record type’s limitations that relate to root domains. ANAME records point a root domain to another domain or subdomain, which CNAME records aren’t allowed to do. This is useful in cases where a different server hosts some of the root domain’s functionality.

  • DNS record example: When you type in “blog.example.com” and are taken to “www.example.com,” that is the CNAME aliasing those domains onto each other.

What Are DNS MX Records?

MX records, or mail exchange records, specify the mail servers that are responsible for handling email for a particular domain. MX records must always point directly to an A or AAAA record; they cannot point to a CNAME or other aliases.

Some DNS entries have multiple MX records that cover many mail servers for the purpose of redundancy. In this case, priority values are assigned to each MX record, where lower values get priority over higher values. If multiple MX records have the same priority value, they enter a round-robin scheme, which randomly assigns emails to each server of equal priority.

  • DNS record example: When you send an email to “[email protected],” the DNS system looks up the correct mail server for the domain “example.com,” ensuring the message reaches its intended recipient.

What Are DNS TXT Records?

A TXT record (or text record) is the most versatile DNS record type, able to hold various kinds of text-based information. It generally covers use cases for which other DNS record types would be inappropriate. Its original purpose was to add notes to the zone file, though it’s now mostly used for spam filtering and verifying domain ownership. 

  • DNS record example: One possible use case is making sure that domain names are tied to an appropriate brand, like “brandname.com” being tied to the words “Brand Name” in a TXT record.

What Is an SRV Record?

SRV records (or service records) define the host and port for specific services hosted on a domain, letting users access them.

  • DNS record example: SRV records are used when you try to access an online service that isn’t a website, like VoIP, online gaming or cloud storage.

What Is an NS Record?

NS records (or name server records) specify the authoritative DNS servers responsible for hosting the DNS records of a particular domain. Domains often have at least two NS records pointing to different primary and secondary DNS servers, either for redundancy or load-balancing. NS records operate at every level of the domain hierarchy:

  • Top-level domain (TLD) NS records: Before reaching the domain-specific NS records, the DNS system queries the nameservers for the top-level domain (.com, .net, .org, etc.).
  • Domain-specific NS records: Each domain has its own NS records pointing to the authoritative nameserver.
  • DNS record example: When you access “example.com,” the NS record tells the DNS system where to find all the DNS records related to that domain name.

Other Types of DNS Records

Apart from the essential DNS records that we listed, you might also encounter the following:

  • SOA records: These store administrative information about a domain, such as the primary name server or the email address for the administrator.
  • PTR records: This type is used for a reverse DNS lookup, which maps an IP address back to its domain name.
  • NAPTR records: These records are used for mapping telephone numbers to internet resources.
  • CAA records: These specify which certificate authorities are allowed to issue SSL/TLS certificates for a domain for security purposes.
  • SSHFP records: These ones store SSH public key fingerprints used for secure server authentication.

Final Thoughts

Understanding DNS records is crucial for anyone who works with websites, email servers or any internet-based services. While the intricacies of the domain name system can be complex, knowing the most common record types and their purposes will help you to better manage your website’s operation.

As the internet continues to evolve, DNS records will remain a vital component, ensuring users can easily access the content they need. What are your thoughts on the DNS system? Have you ever had to configure DNS records yourself? Have you ever encountered issues with DNS records when setting up a website? Let us know in the comments below, and as always, thank you for reading.

FAQ: Domain Name System Records

  • An MX record identifies the email servers tied to a particular domain, making sure emails reach their appropriate destinations.

  • NS records delegate a DNS zone (or domain) to the correct authoritative DNS server.

  • DNS records are stored on a DNS server that holds all the zone files for a particular domain.

  • An A record contains information about which IP address belongs to which domain.

↑ Top