The records you will meet in nearly every zone
DNS Zone Files Explained: Records, Format and Examples
A DNS zone file is a text representation of DNS records for a zone, such as example.com. It describes names and the data associated with them, including addresses, aliases, mail exchangers, nameservers, and text policies. Many managed providers hide the raw file behind a web interface, but exports and imports still use zone-file concepts. Understanding the format is valuable during provider migrations, audits, and troubleshooting because a record can be syntactically valid yet attached to the wrong name or interpreted with an unexpected default. A careful review should consider both each record's content and the zone context in which it appears.
The parts of a resource record
A resource record generally includes an owner name, an optional TTL, a class (usually IN for internet data), a record type, and type-specific data. A line for an A record contains an IPv4 address; an MX line contains a preference and mail-exchanger hostname; a CNAME line contains a canonical target name. Zone files can use relative names, where an owner is interpreted relative to the zone origin, and special symbols such as @ to represent the zone apex. A trailing dot can mark a fully qualified name. When importing data, confusing relative and absolute names can accidentally create a repeated domain suffix.
| Concept | Meaning when reviewing a zone |
|---|---|
| Owner name | The DNS name to which a record belongs |
| TTL | How long a resolver may cache the data |
| Type | The kind of question the record answers |
| RDATA | The value or values specific to that record type |
| Origin | The zone context for relative names |
The zone apex is the bare zone name, such as example.com, and is often represented by @ in a zone file. This is where SOA and NS records for the zone belong. A and AAAA records at the apex publish addresses, while subdomain owners such as www or mail represent separate names. Providers sometimes offer ALIAS or flattening features that look like an address at the apex while following a hostname behind the scenes; these are provider-specific behaviors rather than ordinary CNAME records at the root. During a migration, check how the destination provider maps such features before copying them literally.
Review a zone as a complete service map
Do not treat a DNS export as only a website configuration. Email delivery may depend on MX plus SPF, DKIM, and DMARC TXT records. Ownership validation for analytics, search services, certificate systems, and SaaS platforms can rely on TXT or CNAME records. Service discovery can use SRV, and delegated subdomains may have their own NS records. An old record that looks unfamiliar may still support a production dependency. Before deleting anything, identify its owner and purpose. If the origin is unknown, compare the record against application documentation and ask the team responsible rather than assuming that an unused-looking hostname is safe to remove.
- Export the full zone before a provider migration or cleanup.
- Check apex and subdomain names carefully, including relative-name rules.
- Preserve email, verification, and delegated-subdomain records.
- Review TTLs and provider-specific flattening or proxy features.
- After import, query authoritative nameservers and compare critical records.
Importing and validating safely
A zone-file import can fail because of unsupported record types, formatting differences, duplicate owners, or provider-specific extensions. Validate the exported file before cutover and inspect the provider's import report for skipped records. If the DNS provider changes, make sure the new zone is populated before updating registrar delegation. Once the delegation changes, check the NS records and query key records directly. Compare the live answers with the source export and run service-specific checks for the website and email. A syntactically successful import is not the same as a verified migration; it proves only that the tool accepted the file.
For the most common record meanings, consult DNS record types explained. For the nameserver side of a migration, read what an NS record does. A zone file is a compact inventory of configuration, and its value is greatest when teams preserve context alongside the raw lines. Add notes about why unusual records exist, who owns them, and which services depend on them. That small amount of documentation can prevent a later cleanup from silently removing something important.
Preserve intent, not just the exported lines
A raw zone export is a useful backup, but it rarely explains why a record exists or which team depends on it. Add an inventory alongside the file that identifies the application owner, vendor, renewal or review date, and whether a value is safe to change. This context is especially important for TXT records, which may look like arbitrary tokens but can prove domain ownership or authorize mail systems. During an audit, distinguish records that are active from records that are obsolete but retained for a transition. After importing into a new provider, compare both data and behavior: provider-specific proxy toggles, flattening, and validation settings may not be represented as ordinary zone-file lines. A zone is operational configuration, so preserving its intent makes later changes safer.
Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.
Related reading
Two addressing schemes, running side by side
IPv4
192.0.2.10
32 bits -- ~4.3 billion addresses -- exhausted
IPv6
2606:4700::6810:84e5
128 bits -- 340 undecillion addresses
Static vs. Dynamic IP Addresses: Key Differences
Compare static and dynamic IP addresses, learn where each is used, and understand why domain DNS records should not be confused with a fixed address.
Three reasons the same domain answers differently
Geo-routing
A different edge server per region
Caching
Independent TTLs, independent caches
Split-horizon
A different answer, by design
IP Geolocation Explained: What an IP Address Can Reveal
Learn how IP geolocation estimates network location, why results can differ from a user's physical location, and what a DNS lookup can actually tell you.
The records you will meet in nearly every zone
DNS Wildcard Records Explained: How They Match Subdomains
Learn how wildcard DNS records match otherwise-unconfigured names, when they simplify subdomain management, and how they can hide mistakes.