Home > Learn > Domains > DNS Record Types Explained: A, AAAA, CNAME, MX, TXT, NS, SRV & CAA
The Domain Name System (DNS) is the backbone of the internet, translating user-friendly domain names into IP addresses that computers use to identify each other on the network. Understanding DNS records is crucial for anyone managing a website or server, as these records dictate how domain names are handled by the DNS infrastructure. From ensuring emails are delivered correctly to routing users to the right web server, DNS records play a vital role in the smooth operation of online services.
This article is part of Rackset’s Domains guides — browse the rest of the category for more in-depth tutorials on this topic.
In this article, we’ll delve into the most common DNS record types: A, AAAA, CNAME, MX, TXT, NS, SRV, and CAA. Whether you’re setting up a new domain, troubleshooting an issue, or just curious about how the internet works, this guide will provide a comprehensive overview of each record type, their purpose, and how they function within the DNS ecosystem. By the end, you’ll have a solid understanding of how these records contribute to the seamless interaction between users and websites.
Understanding DNS Records
DNS records are essential components of the Domain Name System (DNS), which is responsible for translating human-friendly domain names into IP addresses that computers use to identify each other on the network. Each type of DNS record serves a specific purpose and plays a critical role in the functionality and management of a domain.
Types of DNS Records
There are several types of DNS records, each serving a unique function. Understanding these types can help in managing and troubleshooting domain-related issues.
- A Record: The Address Record maps a domain to an IPv4 address. It is one of the most common DNS records used to connect a domain to a specific server.
- AAAA Record: Similar to the A record, the AAAA record maps a domain to an IPv6 address, which is a longer IP address format.
- CNAME Record: The Canonical Name Record is used to alias one domain to another. It is useful for pointing multiple domain names to the same website.
- MX Record: The Mail Exchange Record specifies the mail server responsible for receiving email messages on behalf of a domain.
- TXT Record: This record allows domain administrators to insert arbitrary text into a DNS record. It is often used for verification purposes and to implement email security measures.
- NS Record: The Name Server Record specifies the authoritative DNS servers for a domain. It indicates which servers contain the actual DNS records for a domain.
- SRV Record: Service records are used to define the location of servers for specified services, such as SIP or LDAP.
- CAA Record: The Certification Authority Authorization Record allows domain owners to specify which certificate authorities are permitted to issue SSL certificates for the domain.
A and AAAA Records: IP Address Mapping

DNS records play a crucial role in the functioning of the internet by translating domain names into IP addresses. Among the most fundamental types of DNS records are A and AAAA records. These records are essential for directing internet traffic to the correct server by mapping domain names to their respective IP addresses.
A Records
An A record, or Address record, is used to map a domain name to an IPv4 address. IPv4 addresses are numerical labels consisting of four octets, separated by periods, such as 192.0.2.1. A records are among the most common DNS records and are critical for ensuring that a domain name points to the correct server hosting the website or service.
- Purpose: Directs traffic to a specific server using an IPv4 address.
- Structure: Consists of a domain name and its corresponding IPv4 address.
- Example:
example.com IN A 192.0.2.1
AAAA Records
AAAA records, or Quad-A records, are similar to A records but are used to map domain names to IPv6 addresses. IPv6 is the latest version of the Internet Protocol, designed to replace IPv4 due to address exhaustion. IPv6 addresses are written as eight groups of four hexadecimal digits, separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
If you need this service, Rackset’s team provides professional domain registration with full support so you can rely on the quality and get set up quickly.
Read more: SSL Certificate Types Explained: DV vs OV vs EV, Wildcard & Multi-Domain (SAN)
- Purpose: Directs traffic to a server using an IPv6 address.
- Structure: Consists of a domain name and its corresponding IPv6 address.
- Example:
example.com IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Both A and AAAA records are essential for the seamless operation of websites and online services. While A records continue to be widely used due to the prevalence of IPv4, the adoption of IPv6 and AAAA records is increasing as the demand for IP addresses grows.
CNAME Records: Alias for Domain Names
CNAME records, or Canonical Name records, are a type of DNS record used to create an alias for a domain name. This allows multiple domain names to point to the same IP address, facilitating domain management and ensuring consistency across different services.
Understanding CNAME Records
The primary function of a CNAME record is to map an alias domain name to the canonical domain name, which is the true or original domain name. This is particularly useful when you want to point multiple domain names to a single web server.
- Alias Domain: The domain name that is used as an alias.
- Canonical Domain: The actual domain name where the alias points.
Common Uses for CNAME Records
CNAME records are versatile and can be used in various scenarios, including:
- Subdomain Management: Redirecting subdomains to the main domain or another subdomain.
- Content Delivery Networks (CDNs): Pointing to a CDN provider’s domain to manage content delivery efficiently.
- Load Balancing: Directing traffic to different servers for load balancing purposes.
- Email Services: Ensuring email services are correctly routed through the appropriate servers.
Limitations of CNAME Records
While CNAME records are highly useful, they do have certain limitations:
- Root Domain Restriction: CNAME records cannot be used at the root level of a domain, meaning you cannot create a CNAME record for the main domain itself.
- Performance Impact: Introducing additional DNS lookups, which may slightly impact performance.
How to Configure a CNAME Record
- Log in to your DNS management interface.
- Select the domain for which you want to create a CNAME record.
- Choose the option to add a new record and select “CNAME” as the record type.
- Enter the alias domain name and the canonical domain name.
- Save the changes and allow time for DNS propagation.
MX Records: Mail Exchange Servers

MX (Mail Exchange) records are a critical component of the DNS system, responsible for directing email messages to the correct mail servers. They are essential for ensuring that emails are delivered to their intended destinations. Understanding how MX records function can help you manage your email services more effectively.
Function of MX Records
MX records specify the mail servers responsible for receiving email on behalf of a domain. They work in conjunction with A and AAAA records, which provide the IP addresses of the mail servers. When an email is sent to your domain, the sending mail server queries the DNS to retrieve the MX records and determine the appropriate destination for the message.
Read more: Domain Extensions Explained: .com, .net, .org & Beyond
Priority in MX Records
Each MX record has a priority value, which indicates the order in which mail servers should be used. Lower numbers have higher priority. This allows for load balancing and failover mechanisms, ensuring email delivery even if one server is unavailable. If the highest priority server is down, the next one in line will receive the emails.
Choosing and registering the right domain is your online identity. Through Rackset’s domain names you can search your ideal name and register it instantly with full support.
- Primary Server: The server with the lowest priority value. It receives emails first.
- Secondary Servers: These have higher priority values and act as backups.
Example of MX Records
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
In this example, mail1.example.com is the primary mail server due to its lower priority number, while mail2.example.com acts as a backup.
Setting Up MX Records
- Log into your DNS management interface.
- Locate the MX records section for your domain.
- Add or modify records, specifying the mail server’s domain name and priority.
- Save your changes and allow time for DNS propagation.
Proper configuration of MX records is crucial for reliable email delivery. Ensure that your mail servers are correctly prioritized and that backup servers are available to handle any potential downtime.
TXT Records: Textual Information
TXT records are a versatile DNS record type used to store text data that can be associated with a domain. They serve various functions, from providing human-readable information to supporting important technical configurations.
Purpose of TXT Records
- SPF Records: Sender Policy Framework (SPF) uses TXT records to specify which mail servers are permitted to send emails on behalf of your domain. This helps in reducing spam and email spoofing.
- Domain Verification: TXT records are often used by web services to verify domain ownership. The service provides a unique string that you add as a TXT record to prove control over the domain.
- DKIM Records: DomainKeys Identified Mail (DKIM) uses TXT records to store public keys for email signing. This helps in ensuring the integrity and authenticity of email messages.
- General Information: TXT records can also contain arbitrary text information about the domain, such as contact details or technical notes.
Structure of a TXT Record
A TXT record consists of a domain name, a TTL (time to live) value, and a text field that holds the actual information. The text field can contain up to 255 characters, and multiple TXT records can be used if more space is needed.
Example of a TXT Record
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
In the example above, the TXT record is used for SPF configuration. It specifies that mail from the domain should be sent via Google’s mail servers, and any other server attempting to send mail on behalf of the domain should be treated as suspect.
Considerations When Using TXT Records
- Character Limits: Keep in mind the character limit of 255 per record. Use multiple records if necessary.
- Security: Ensure that sensitive information is not exposed through TXT records, as they are publicly accessible.
- Consistency: Regularly review and update TXT records to ensure they reflect current configurations and policies.
NS, SRV, and CAA Records: Specialized Functions
NS Records: Name Server Delegation
NS (Name Server) records are essential components of the DNS infrastructure. They specify the authoritative name servers for a particular domain, which are responsible for handling queries related to that domain. Without properly configured NS records, a domain cannot be resolved to its associated IP addresses.
Read more: Setting Up DNS Records in Cloudflare: A Step-by-Step Guide
- Delegation: NS records delegate the DNS resolution responsibility to specified name servers.
- Redundancy: Multiple NS records ensure redundancy and reliability, allowing DNS queries to be answered even if one server is down.
With Rackset’s hosting services, you can easily manage your NS records through a user-friendly control panel, ensuring your domain’s DNS is always correctly configured and up-to-date.
If you need this service, Rackset’s team provides professional SSL certificate with full support so you can rely on the quality and get set up quickly.
SRV Records: Service Location
SRV (Service) records are used to define the location of servers for specific services. Unlike A or AAAA records, which map domain names to IP addresses, SRV records provide details about the service, protocol, priority, weight, port, and target host.
- Service Identification: SRV records specify the service type and protocol, such as SIP or LDAP.
- Load Balancing: By using priority and weight, SRV records help distribute the load across multiple servers.
Rackset supports the configuration of SRV records, facilitating the seamless setup of services like VoIP or instant messaging on your domain.
CAA Records: Certificate Authority Authorization
CAA (Certificate Authority Authorization) records enable domain owners to specify which certificate authorities (CAs) are allowed to issue SSL/TLS certificates for their domain. This adds an additional layer of security by preventing unauthorized certificate issuance.
- Security Enhancement: CAA records help prevent mis-issuance of certificates by unauthorized CAs.
- Compliance: CAA records ensure adherence to industry standards for SSL/TLS certificate issuance.
With Rackset’s hosting solutions, setting up CAA records is straightforward, enhancing the security of your domain and protecting your online presence.
Need expert help from Rackset?
Want this done fast, professionally and hassle-free? Rackset’s experienced team and full support are here to help you get the best result.
Conclusion
Understanding DNS records is crucial for anyone managing a website, as these records are the backbone of internet connectivity. The various types of DNS records, such as A, AAAA, CNAME, MX, TXT, NS, SRV, and CAA, each serve specific roles in directing internet traffic and ensuring seamless communication between servers and users. By mastering these DNS records, you can effectively manage your domain settings, enhance website performance, and ensure robust security protocols.
Whether you’re setting up a simple blog or a complex e-commerce platform, having the right DNS configuration is essential. At Rackset, we provide reliable hosting solutions that support all DNS record types, empowering you to manage your web presence with confidence and ease. Explore our hosting options today to leverage powerful tools and expert support for your online success.
Frequently Asked Questions
What is an A record in DNS?
An A record, or Address Record, maps a domain name to its corresponding IPv4 address. It is one of the most common DNS records and is essential for directing traffic to the correct server hosting a website.
How does an AAAA record differ from an A record?
An AAAA record is similar to an A record but maps a domain name to an IPv6 address instead of an IPv4 address. This is crucial for supporting the newer IPv6 protocol, which allows for a larger number of unique IP addresses.
What is the purpose of a CNAME record?
A CNAME record, or Canonical Name Record, is used to alias one domain name to another. This is helpful for pointing multiple domain names to the same website or for setting up subdomains with ease.
Why are MX records important for email?
MX records, or Mail Exchange records, specify the mail servers responsible for receiving email on behalf of a domain. They are critical for ensuring that emails are correctly routed to the intended mail server.
What role do TXT records play in DNS?
TXT records are used to store text information related to a domain, which can include verification data or security measures like SPF records. They are versatile and can be used for various purposes such as domain verification and email security.
Leave a Reply