DNS Record Types: Complete Reference Guide
A complete reference guide covering all DNS record types including A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR, CAA, and NAPTR with syntax, usage, and examples.
Last updated: 2026-02-17
Every domain on the internet depends on DNS records to function. Whether you are setting up a new website, configuring email, or troubleshooting connectivity issues, understanding DNS record types is essential. This reference covers every record type you are likely to encounter, with practical syntax examples and guidance on when to use each one.
A Record (Address Record)
The A record is the most fundamental DNS record type. It maps a domain name to an IPv4 address, telling browsers and other clients where to find a server.
Syntax:
example.com. IN A 203.0.113.50
When to use: Every domain that needs to resolve to a server requires at least one A record. Use A records for your root domain, subdomains pointing to specific servers, and any hostname that needs to resolve to an IPv4 address.
Common values: Web server IPs, load balancer IPs, CDN endpoint IPs.
Multiple A records
You can create multiple A records for the same hostname to implement basic round-robin load balancing. DNS resolvers will rotate through the available addresses.
AAAA Record (IPv6 Address Record)
The AAAA record is the IPv6 equivalent of the A record. It maps a domain name to a 128-bit IPv6 address.
Syntax:
example.com. IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
When to use: Any time you have IPv6 connectivity available for your servers. Modern best practice is to publish both A and AAAA records for dual-stack support.
Common values: IPv6 addresses assigned by your hosting provider or cloud platform.
CNAME Record (Canonical Name)
A CNAME record creates an alias from one domain name to another. When a resolver encounters a CNAME, it follows the chain to the canonical (true) name and resolves that instead.
Syntax:
www.example.com. IN CNAME example.com.
blog.example.com. IN CNAME hosting.provider.com.
When to use: Point subdomains to third-party services (CDNs, SaaS platforms, hosting providers), create aliases like www that point to your root domain, or simplify management when multiple hostnames should resolve to the same target.
CNAME restrictions
A CNAME record cannot coexist with other record types at the same name. You cannot place a CNAME at the zone apex (root domain) alongside NS or SOA records. Some DNS providers offer proprietary alternatives like ALIAS or ANAME records for this purpose.
MX Record (Mail Exchange)
MX records direct email delivery for a domain. They specify which mail servers accept incoming email and in what order of preference.
Syntax:
example.com. IN MX 10 mail1.example.com.
example.com. IN MX 20 mail2.example.com.
When to use: Every domain that receives email needs MX records. The priority value (lower number = higher priority) controls the order in which mail servers are tried.
Common values: Google Workspace uses priorities 1, 5, 5, 10, 10 with servers like aspmx.l.google.com. Microsoft 365 uses a single MX record pointing to <tenant>.mail.protection.outlook.com.
TXT Record (Text)
TXT records store arbitrary text data associated with a domain. They have become critical for email authentication, domain verification, and security policies.
Syntax:
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
example.com. IN TXT "google-site-verification=abc123..."
When to use: SPF records for email sender authorization, DKIM public keys, DMARC policies, domain ownership verification for services like Google Search Console, and any other text-based metadata.
Common values: SPF policies, DKIM selectors, DMARC policies, verification tokens.
Monitor your DNS records automatically
Get alerted when any DNS record changes unexpectedly, including TXT records used for email authentication.
NS Record (Name Server)
NS records delegate a DNS zone to specific authoritative name servers. They tell the rest of the internet which servers are responsible for answering queries about a domain.
Syntax:
example.com. IN NS ns1.dnshost.com.
example.com. IN NS ns2.dnshost.com.
When to use: NS records are set at your domain registrar to point to your DNS hosting provider. You can also use NS records to delegate subdomains to different name servers.
Common values: Name server hostnames provided by your DNS hosting provider (e.g., Cloudflare, Route 53, Google Cloud DNS).
SOA Record (Start of Authority)
The SOA record is mandatory for every DNS zone. It contains administrative information about the zone, including the primary name server, the responsible party's email, and timing parameters for zone transfers and caching.
Syntax:
example.com. IN SOA ns1.dnshost.com. admin.example.com. (
2026021701 ; Serial number
3600 ; Refresh (1 hour)
900 ; Retry (15 minutes)
1209600 ; Expire (2 weeks)
86400 ; Minimum TTL (1 day)
)
When to use: Every zone has exactly one SOA record, typically managed by your DNS provider. You rarely need to edit it manually, but understanding its fields is important for troubleshooting replication and caching issues.
SOA Field Reference
| Field | Purpose | Typical Value |
|---|---|---|
| Serial | Version number, incremented on each change | YYYYMMDDnn format |
| Refresh | How often secondaries check for updates | 3600 (1 hour) |
| Retry | Wait time after a failed refresh | 900 (15 min) |
| Expire | When secondaries stop serving stale data | 1209600 (2 weeks) |
| Minimum TTL | Negative caching duration | 86400 (1 day) |
SRV Record (Service Locator)
SRV records define the location of specific services, including the hostname, port, priority, and weight. They enable service discovery without hardcoding port numbers.
Syntax:
_sip._tcp.example.com. IN SRV 10 60 5060 sipserver.example.com.
Format: priority weight port target
When to use: VoIP (SIP), XMPP/Jabber, LDAP, Kerberos, Microsoft Active Directory, and any protocol that supports SRV-based service discovery.
Common values: Microsoft 365 uses SRV records for Skype for Business/Teams federation. Jabber/XMPP clients look up SRV records to find chat servers.
PTR Record (Pointer)
PTR records provide reverse DNS lookup, mapping an IP address back to a hostname. They are the inverse of A and AAAA records.
Syntax:
50.113.0.203.in-addr.arpa. IN PTR mail.example.com.
When to use: Email deliverability depends heavily on PTR records. Mail servers check that the sending IP has a valid reverse DNS entry matching the server's hostname. Also used for logging, diagnostics, and security tools.
Who manages PTR records?
PTR records are managed by the owner of the IP address block, which is typically your hosting provider or ISP. You usually need to request reverse DNS entries through their control panel or support team.
CAA Record (Certification Authority Authorization)
CAA records specify which Certificate Authorities (CAs) are permitted to issue SSL/TLS certificates for a domain. They help prevent unauthorized certificate issuance.
Syntax:
example.com. IN CAA 0 issue "letsencrypt.org"
example.com. IN CAA 0 issuewild "letsencrypt.org"
example.com. IN CAA 0 iodef "mailto:security@example.com"
When to use: Every domain should have CAA records as a security best practice. They limit which CAs can issue certificates, reducing the risk of misissued certificates.
CAA Tag Reference
issue
issuewild
iodef
NAPTR Record (Naming Authority Pointer)
NAPTR records support URI-based lookups and are used in telephony (ENUM) and other systems that map identifiers to services. They are more complex than most record types.
Syntax:
example.com. IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:info@example.com!" .
Format: order preference flags services regexp replacement
When to use: ENUM (telephone number to URI mapping), SIP routing, and other applications that require regex-based URI rewriting during DNS resolution.
Quick Reference Table
| Record Type | Purpose | Example Value |
|---|---|---|
| A | Maps name to IPv4 | 203.0.113.50 |
| AAAA | Maps name to IPv6 | 2001:db8::1 |
| CNAME | Alias to another name | example.com. |
| MX | Mail server routing | 10 mail.example.com. |
| TXT | Text metadata | "v=spf1 include:..." |
| NS | Delegates zone authority | ns1.dnshost.com. |
| SOA | Zone admin info | ns1.dnshost.com. admin... |
| SRV | Service locator | 10 60 5060 sip.example.com. |
| PTR | Reverse lookup | mail.example.com. |
| CAA | CA authorization | 0 issue "letsencrypt.org" |
| NAPTR | URI rewriting | 100 10 "u" "E2U+sip" ... |
Choosing the Right Record Type
When setting up a new service, ask these questions:
- Does it need a web address? Use an A record (and AAAA for IPv6).
- Does it point to another hostname? Use a CNAME record.
- Does it receive email? Set up MX records and supporting TXT records for SPF, DKIM, and DMARC.
- Does it run on a non-standard port? Consider an SRV record if the protocol supports it.
- Do you need to verify domain ownership? Add a TXT record.
- Do you want to restrict certificate issuance? Add CAA records.
Keeping track of every DNS record across your domains is a challenge. Automated monitoring ensures nothing slips through the cracks.
Never miss a DNS record change
DNS Monitor watches your records around the clock and alerts you when anything changes unexpectedly.