DNS Record Types Explained — A, AAAA, CNAME, MX, TXT, NS
DNS records are the building blocks of the internet. Every time you visit a website, send an email, or use an app, DNS records are doing the work behind the scenes. They tell the internet where your services live and how to reach them.
There are dozens of DNS record types, but you only need to understand a handful to manage most websites and services. Each record type serves a specific purpose. Some point domains to servers. Some handle email routing. Some prove ownership of a domain.
This guide explains every common DNS record type in plain language. I cover what each record does, when you need it, and examples of real-world usage.
A Record — Address Record
The A record is the most fundamental DNS record type. It maps a domain name to an IPv4 address. When you type example.com into your browser, your computer looks up the A record to find the server's IP address. Without an A record, your website does not load.
A records are simple. You specify the name (like example.com or www.example.com) and the IPv4 address (like 192.0.2.1). That is it. The DNS resolver returns that IP address, and your browser connects to it.
You can have multiple A records for the same domain pointing to different IP addresses. This is how round-robin DNS load balancing works. Each query returns a different IP address in rotation, spreading traffic across multiple servers.
Most websites have at least two A records: one for the bare domain (example.com) and one for www (www.example.com). Some use a CNAME for www instead, but A records are more common and slightly faster because they require fewer DNS lookups.
AAAA Record — IPv6 Address Record
The AAAA record is the IPv6 equivalent of the A record. It maps a domain name to an IPv6 address. The name comes from the fact that IPv6 addresses are four times longer than IPv4 addresses — quadruple A.
IPv6 adoption has been growing steadily. As of 2026, most major ISPs and mobile networks support IPv6. Google reports that over 45% of its users connect via IPv6. This means AAAA records are no longer optional for new websites. If you want visitors on IPv6-only networks to reach your site, you need a AAAA record.
You should have both A and AAAA records for your domain. This is called dual-stack configuration. Devices that support IPv6 will use the AAAA record. Devices that only support IPv4 will use the A record. Having both ensures everyone can reach your site regardless of their network configuration.
CNAME Record — Canonical Name Record
A CNAME record aliases one domain name to another. Instead of returning an IP address, it tells the resolver to look up another domain name and return whatever that domain resolves to. This is useful when you want multiple domain names to point to the same server.
The classic use case is the www subdomain. Many people set www.example.com as a CNAME pointing to example.com. When a resolver looks up www.example.com, it follows the CNAME to example.com, then looks up example.com's A or AAAA record, and returns that IP address.
There is an important rule: you cannot have a CNAME record at the zone apex (the bare domain like example.com). The DNS specification forbids it because the apex already has SOA and NS records. If you want the bare domain to point somewhere, you must use an A record or an ALIAS record (a non-standard extension that works like a CNAME at the apex).
CNAME records are also heavily used by CDNs and SaaS platforms. When you integrate Cloudflare, Shopify, or Squarespace, they often ask you to create a CNAME record pointing to their domain. This lets them manage the underlying IP addresses without requiring you to update your DNS.
MX Record — Mail Exchange Record
MX records specify the mail servers responsible for receiving email on behalf of a domain. When someone sends an email to user@example.com, the sending mail server looks up the MX record for example.com to find where to deliver the message.
Each MX record has a priority number. Lower numbers have higher priority. If you have multiple mail servers, the sending server tries the lowest priority first. If that server is unavailable, it falls back to the next priority. This provides redundancy for email delivery.
A typical MX record setup for Google Workspace looks like this: priority 1 points to ASPMX.L.GOOGLE.COM, priority 5 points to ALT1.ASPMX.L.GOOGLE.COM, and so on. The sending server always tries the priority 1 server first.
MX records must point to a domain name, not an IP address. If you point an MX record to an IP address, some mail servers will reject your email. Always use the mail server hostname provided by your email provider.
TXT Record — Text Record
TXT records hold arbitrary text data associated with a domain. They were originally designed for human-readable notes, but they are now used for machine-readable data. TXT records are essential for email authentication, domain ownership verification, and security policies.
The most important use of TXT records is email authentication. SPF (Sender Policy Framework) records list which servers are authorized to send email for your domain. DKIM (DomainKeys Identified Mail) records contain public keys that verify email signatures. DMARC (Domain-based Message Authentication, Reporting & Conformance) records tell receiving mail servers how to handle emails that fail authentication checks.
Without these TXT records, your domain is vulnerable to email spoofing. Attackers can send emails that look like they come from your domain, tricking recipients into revealing sensitive information. SPF, DKIM, and DMARC records prevent this.
TXT records are also used for domain verification by services like Google Search Console, Microsoft 365, and Amazon SES. The service gives you a unique string to add as a TXT record, proving you control the domain.
NS Record — Nameserver Record
NS records delegate a domain to a specific set of DNS servers. They tell the internet which nameservers are authoritative for your domain. When you register a domain and point it to your DNS hosting provider, you are updating the NS records at your registrar.
Every domain must have at least two NS records for redundancy. If one nameserver goes down, the other handles queries. The NS records are published in two places: at the registrar (the parent zone) and in your own zone file. Both should list the same nameservers.
Changing NS records is how you switch DNS hosting providers. You update the nameservers at your registrar to point to the new provider's servers. This is called a DNS delegation change, and it triggers a full propagation event because the entire DNS hierarchy needs to learn about the new authoritative servers.
Other Important DNS Record Types
PTR Record — Pointer Record
PTR records do the opposite of A records. They map an IP address back to a domain name. This is called reverse DNS. PTR records are stored under the special domain in-addr.arpa for IPv4 and ip6.arpa for IPv6. Email servers use PTR records to verify that the sending server's IP address matches its domain name. If the PTR record is missing or mismatched, many mail servers reject the email.
SOA Record — Start of Authority Record
The SOA record is the first record in every DNS zone file. It contains administrative information about the zone: the primary nameserver, the responsible email address, the zone serial number, and timing values for refresh, retry, expire, and TTL (Time to Live). The serial number is critical for zone transfers. Secondary nameservers check the serial number to know when they need to update their copy of the zone.
SRV Record — Service Record
SRV records specify the location of specific services within a domain. They include a priority and weight for load balancing. SRV records are used by Microsoft Exchange, SIP (VoIP), and some game servers. The format is: _service._protocol.name TTL class SRV priority weight port target. For example, _sip._tcp.example.com points to the SIP service on port 5060.
CAA Record — Certification Authority Authorization Record
CAA records specify which certificate authorities are allowed to issue SSL/TLS certificates for your domain. This is a security measure that prevents unauthorized certificate issuance. If you set a CAA record allowing only Let's Encrypt, no other CA can issue a valid certificate for your domain. Most DNS providers now support CAA records, and I recommend setting one.
How to Check DNS Records
You can check any domain's DNS records using our DNS lookup tool. Enter the domain name and select the record type you want to query. The tool returns the current values from the authoritative nameserver.
For command-line users, dig is the most powerful DNS query tool. To check A records: dig example.com A. To check MX records: dig example.com MX. The output includes the raw DNS response with all technical details like TTL values and query times.
For bulk checks across multiple record types, use our DNS checker. It queries all common record types at once and displays them in a readable table.