DNS records are the individual instructions that tell the internet how to handle a domain. They define where a website lives, which servers handle email, which security policies apply, and much more. Understanding DNS records is fundamental to managing any domain, diagnosing problems, and configuring services correctly.
What Is a DNS Record?
A DNS record is an entry in a zone file — a text-based database stored on an authoritative nameserver. Each record has a specific type, a name, a time-to-live (TTL), and a value. When a resolver queries a domain, the authoritative nameserver returns the relevant records from its zone file.
You can inspect any domain's DNS records using the ShowDNS Check All DNS Records tool or query individual record types with the DNS Lookup tool.
DNS Record Syntax
A DNS record in a zone file follows this format:
NAME TTL CLASS TYPE VALUE
example.com. 3600 IN A 93.184.216.34- NAME — the domain or subdomain the record applies to (trailing dot indicates the DNS root).
- TTL — time-to-live in seconds; how long resolvers cache this record.
- CLASS — almost always
IN(Internet). - TYPE — the record type (A, MX, TXT, etc.).
- VALUE — the record data, specific to the type.
A Record
An A record maps a domain name to an IPv4 address. It is the most fundamental DNS record — without it, a domain cannot be reached over IPv4.
example.com. 3600 IN A 93.184.216.34Learn more: What Is an A Record?
AAAA Record
An AAAA record maps a domain name to an IPv6 address. As the internet transitions from IPv4 to IPv6, AAAA records are increasingly important.
example.com. 3600 IN AAAA 2606:2800:220:1:248:1893:25c8:1946Learn more: What Is an AAAA Record?
CNAME Record
A CNAME (Canonical Name) record creates an alias from one domain name to another. It does not point directly to an IP address — instead, it redirects the resolver to look up the target domain's records.
www.example.com. 3600 IN CNAME example.com.example.com) alongside SOA and NS records. Services like Cloudflare offer CNAME flattening to work around this.Learn more: What Is a CNAME Record?
MX Record
An MX (Mail Exchanger) record specifies the mail servers responsible for receiving email for a domain. MX records include a priority value — lower numbers have higher priority. Multiple MX records provide redundancy.
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.Learn more: What Is an MX Record?
TXT Record
A TXT (Text) record stores arbitrary human-readable or machine-readable text. TXT records are widely used for domain ownership verification, email authentication (SPF, DKIM, DMARC), and site verification for services like Google Search Console.
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
example.com. 3600 IN TXT "google-site-verification=abc123xyz"Learn more: What Is a TXT Record?
NS Record
An NS (Name Server) record identifies the authoritative nameservers for a domain. Every domain must have at least two NS records for redundancy. NS records are set at the registrar and delegate DNS authority to the listed servers.
example.com. 86400 IN NS ns1.example-dns.com.
example.com. 86400 IN NS ns2.example-dns.com.Learn more: What Is an NS Record?
SOA Record
An SOA (Start of Authority) record is the first record in every DNS zone. It defines key administrative information about the zone, including the primary nameserver, the zone administrator's email address, and timing parameters that control zone transfers and caching.
example.com. 86400 IN SOA ns1.example-dns.com. admin.example.com. (
2024120101 ; Serial number (YYYYMMDDNN format)
3600 ; Refresh — how often secondaries check for updates
900 ; Retry — how long before secondary retries a failed refresh
604800 ; Expire — how long secondaries serve stale data after failure
300 ; Minimum TTL for negative caching
)Learn more: What Is an SOA Record?
SRV Record
An SRV (Service) record specifies the host and port for specific services. It is used by applications like SIP (VoIP), XMPP (messaging), and Microsoft Teams to discover service endpoints from DNS.
_sip._tcp.example.com. 3600 IN SRV 10 20 5060 sip.example.com.
; Priority Weight Port TargetCAA Record
A CAA (Certification Authority Authorization) record specifies which Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for a domain. If a CA is not listed in the CAA record, it should refuse to issue a certificate, reducing the risk of fraudulent certificates.
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
example.com. 3600 IN CAA 0 issuewild "letsencrypt.org"
example.com. 3600 IN CAA 0 iodef "mailto:security@example.com"PTR Record
A PTR (Pointer) record is used for reverse DNS lookups — mapping an IP address back to a domain name. PTR records are stored in the special in-addr.arpa (IPv4) or ip6.arpa (IPv6) zones and are managed by the IP address owner (typically your hosting provider or ISP).
34.216.184.93.in-addr.arpa. 3600 IN PTR example.com.Learn more: What Is Reverse DNS?
Summary Table
| Record Type | Purpose | Common Use |
|---|---|---|
| A | Maps domain to IPv4 address | Website hosting, server pointing |
| AAAA | Maps domain to IPv6 address | IPv6 website hosting |
| CNAME | Alias from one domain to another | www subdomain, CDN configuration |
| MX | Mail server for a domain | Email routing (Gmail, Outlook) |
| TXT | Arbitrary text data | SPF, DKIM, DMARC, domain verification |
| NS | Authoritative nameservers | DNS delegation |
| SOA | Zone authority information | Zone administration, serial numbers |
| SRV | Service location and port | VoIP, XMPP, Microsoft Teams |
| CAA | Certificate authority authorization | Restrict SSL certificate issuers |
| PTR | Reverse DNS (IP to domain) | Email server reputation, logging |
Frequently Asked Questions
How many DNS records can a domain have?
There is no hard limit on the number of DNS records a domain can have. You can have multiple A records (for load balancing), multiple MX records (for redundancy), and multiple TXT records (for different services). However, very large zone files can increase DNS response sizes, which may cause issues with UDP packet size limits.
What is DNS TTL and why does it matter?
TTL (Time-to-Live) is the number of seconds resolvers cache a DNS record before re-fetching it. Lower TTLs mean changes propagate faster but increase DNS query load. Higher TTLs reduce query volume but slow down propagation. Learn more: What Is DNS TTL?
Can I have multiple A records for the same domain?
Yes. Multiple A records for the same domain implement round-robin DNS load balancing. Resolvers return the IP addresses in rotation, distributing traffic across multiple servers.
What is the difference between a CNAME and an A record?
An A record points directly to an IP address. A CNAME points to another domain name, which must then resolve to an IP via its own A record. CNAMEs are useful for aliasing subdomains or pointing to CDN endpoints that may change their IP addresses.
How do I check DNS records for a domain?
Use the ShowDNS DNS Lookup tool to query any record type, or the Check All DNS Records tool to see the complete picture. From the command line, use dig example.com ANY or individual queries like dig example.com MX.