Skip to content

What Is a DNS Zone, and Which Record Types Does It Contain?

A DNS zone is the set of records that tells the internet where your website, email and services live. Learn the main record types and how to read them.

10 min readUpdated Nov 19, 2026By XPASS Editorial Team

What Is a DNS Zone, and Which Record Types Does It Contain?

Every domain has a hidden list that tells the internet where to send visitors and where to deliver mail. That list is stored in a DNS zone. If you ever opened a DNS panel and saw rows of letters such as A, MX, TXT and CNAME, you were looking at the zone.

This guide explains what a zone is, how it differs from a domain, what each common record type does, and how to read and manage a zone safely. You will see a complete example and a checklist for changes. Later, when you secure the zone, the guides on what DNSSEC is and how to enable it and verify the result build on the same ideas.

People often mix these terms up, so it helps to separate them.

  • A domain is the name you register, such as example.com.
  • A zone is the set of DNS records for that name, and often its subdomains, kept as a unit. It is described in RFC 1034.
  • Authoritative nameservers are the servers that hold the zone and answer questions about it.

When someone visits your website, their resolver asks the authoritative nameservers for your zone, for example "what is the address of www.example.com?" The answer comes from the records. The registry holds only the pointer to which nameservers are authoritative; the actual records live in the zone at your DNS provider.

A zone can be delegated. If you give a subdomain such as shop.example.com its own nameservers, it becomes a separate zone with its own records. Most small sites keep everything in one zone, which is simpler.

What a record looks like

Each record in a zone has the same basic parts, following the format in RFC 1035.

Part Meaning Example
Name The host the record is about www
Type What kind of information it holds A
Value The data itself 203.0.113.10
TTL How long resolvers may remember it, in seconds 3600
Class Almost always IN for the internet IN

Panels hide the class and often show the name as a short label, where an at sign or a blank field means the bare domain.

The main record types

NS: who is in charge

NS records list the authoritative nameservers for the zone. They are what the registry points to. If they are wrong, nothing else in the zone is reached. Changing them moves control of the whole zone, which is why a mistake there is serious.

A and AAAA: name to address

An A record maps a name to an IPv4 address, for example 203.0.113.10. An AAAA record maps a name to an IPv6 address. A site can have both, so that visitors using either version of the protocol can reach it. The bare domain and www usually have A or AAAA records.

CNAME: an alias

A CNAME record says that one name is an alias of another. For example, www can be an alias of a hosting platform's hostname, and the platform can change its address without you touching anything. Two rules matter. A name with a CNAME cannot have other record types at the same name, and the bare domain, also called the apex, usually cannot be a CNAME because it must also hold NS and SOA records. Some providers offer a flattened alias feature for the apex as a workaround.

MX: where email goes

MX records name the servers that accept mail for the domain, each with a priority number. Lower numbers are tried first. They point to host names, not directly to IP addresses, and those host names need A or AAAA records themselves. Wrong or missing MX records stop incoming mail.

TXT: free-form text with important jobs

A TXT record holds text. In practice it carries several vital items: SPF, which lists the servers allowed to send mail for your domain; DKIM public keys under a selector name; DMARC policy at the _dmarc name; and verification strings that a service asks you to publish to prove ownership. A domain may have many TXT records, but certain items, such as SPF, should appear only once at the same name.

SRV: services at a port

SRV records tell clients which host and port a particular service uses, with priority and weight. They are used by some chat, voice and directory services. A normal website does not need one.

CAA: who may issue certificates

CAA records state which certificate authorities are allowed to issue certificates for the domain. When present, authorities are expected to check them before issuing. It is an optional control, but useful for a domain that wants to limit who can issue.

SOA: the zone's header

The SOA record sits at the start of every zone. It names the primary nameserver, a contact, a serial number and timers that control how secondary servers refresh. Your DNS provider usually manages it for you.

PTR: reverse lookup

PTR records map an IP address back to a name. They live in the reverse zone, which is controlled by whoever owns the IP address, usually a hosting provider, not by your domain's zone. Mail servers sometimes care about them.

DNSSEC records

If DNSSEC is on, the zone also holds DNSKEY and RRSIG records, and the registry holds a DS record. You do not edit these by hand. The process is covered in the guide on enabling DNSSEC.

A complete example zone

Here is a small zone for example.com, written the way many panels display it. The addresses are documentation addresses.

Name Type Value Purpose
@ NS ns1.dnshost.example Authoritative server
@ NS ns2.dnshost.example Second authoritative server
@ A 203.0.113.10 The website at the bare domain
@ AAAA 2001:db8::10 Same website over IPv6
www CNAME example.com www follows the bare domain
shop CNAME stores.platform.example Shop hosted by a platform
@ MX 10 mail1.mailhost.example Primary mail server
@ MX 20 mail2.mailhost.example Backup mail server
@ TXT v=spf1 include:mailhost.example ~all Which servers may send mail
selector1._domainkey TXT v=DKIM1; k=rsa; p=... Public key for signing mail
_dmarc TXT v=DMARC1; p=none; rua=mailto:reports@example.com Mail policy and reports
@ CAA 0 issue "letsencrypt.org" Only this authority may issue certificates

Notice how a visitor to www.example.com follows the CNAME to example.com and then the A record to the address. Mail to anyone at example.com goes to the MX hosts. The shop subdomain goes elsewhere entirely, which is a common pattern covered in the article on setting up subdomains for a shop, blog and member area.

How to read and change a zone safely

Follow a simple routine each time you edit.

  1. Export or screenshot the current zone. You need a way back.
  2. Change one thing at a time. If several edits are made together, you will not know which one caused a problem.
  3. Check the type before you save. A common mistake is entering an IP address in a CNAME value or a host name in an A record.
  4. Mind the trailing dot. Some panels need a full name ending in a dot, others add the domain for you. A value that gets the domain appended twice breaks quietly.
  5. Lower the TTL before important changes. A short TTL on the record you will edit lets mistakes be fixed faster. Raise it afterwards.
  6. Verify with a lookup. Use dig example.com A or an online DNS lookup tool and confirm the answer matches what you intended.
  7. Test the actual service. Load the site, send a test email, and check certificates when relevant.
  8. Write down what you changed. A short note with the date saves a lot of confusion later.

TTL: the memory of the internet

TTL is the number of seconds a resolver may keep an answer before asking again. A long TTL reduces lookups and makes the zone resilient to short outages, but it slows how fast edits reach visitors. A short TTL helps you correct mistakes quickly at the cost of more queries. Many owners use a moderate value for normal operation and lower it a day before planned moves. When a change appears to have no effect, an old answer cached under a long TTL is a frequent explanation.

A quick audit you can do in ten minutes

Once a year, or before any migration, read your zone from top to bottom and ask a few questions about each row. Do I know what this record is for? Does the value still point to something I own or pay for? Is there a duplicate with a different value? Does the name belong to a service I have stopped using? Records for retired services are worth removing, because a record that points to a platform you no longer use can sometimes be claimed by someone else, which is known as a dangling record. After the cleanup, check the essentials again: the website at the bare domain and at www, incoming and outgoing email, and any verification records that tools still depend on. Keep a copy of the cleaned zone somewhere outside the DNS panel, so you can restore it if a mistake is ever made.

Common mistakes

  • Putting a CNAME on the bare domain. This conflicts with the NS and SOA records that must live there.
  • Forgetting the www record. The bare domain works, but www shows an error, or the other way round.
  • Multiple SPF records. Only one SPF TXT record should exist. Merge them instead of adding a second.
  • Wrong MX priority or missing host record. Mail goes to the wrong server or nowhere.
  • Pointing MX at an IP address. MX values must be host names.
  • Leaving old records behind. Stale A records can send some visitors to a server that no longer exists.
  • Moving nameservers without copying the zone. The new servers answer with nothing. The guide on fixing a website that went down after a nameserver change shows how to diagnose that.

Limits and what to watch for

  • The zone is only as good as its provider. Reliability, speed and features such as DNSSEC depend on the DNS host you choose.
  • Not every type is supported everywhere. Some panels hide SRV, CAA or advanced alias records.
  • Changes are not instant everywhere. Caches mean different visitors see the change at different times.
  • Secrets do not belong in TXT records. Everything in DNS is public.
  • Keep access secure. Whoever can edit your zone can redirect your website and mail. Use strong passwords and two-step verification on the DNS account and the registrar.
  • Limits exist. DNS providers may restrict the number of records, the length of TXT strings or certain record types, so check the documentation for your plan.

Summary

A DNS zone is the collection of records that tells the world where your domain's website, email and other services live, served by authoritative nameservers. NS records name the servers in charge, A and AAAA records map names to addresses, CNAME records create aliases, MX records route mail, TXT records carry SPF, DKIM, DMARC and verification text, and SRV, CAA, SOA and PTR records handle more specialised jobs. Edit carefully: back up, change one thing at a time, check the type and value, and verify with a lookup. To see how your own domain and its DNS records can be managed together, visit the domains page.

Frequently asked questions

What is a DNS zone?

A DNS zone is the collection of DNS records for a domain, and sometimes its subdomains, that is managed in one place by a set of authoritative nameservers. It is like the page in a directory that lists where each part of your domain should be found.

What is the difference between an A record and a CNAME record?

An A record maps a name directly to an IPv4 address. A CNAME record makes one name an alias of another name, so the answer follows the target. A CNAME cannot sit on a name that has other records, which is why the bare domain normally uses A records instead.

Which records does email need?

Email delivery uses MX records to say which servers receive mail. TXT records usually carry SPF, DKIM and DMARC policies that help receivers decide whether a message is genuine.

Do I need to understand every record to run a website?

No. For a basic website you mostly need NS, A or AAAA and perhaps CNAME records. Learn the others when you add email, verification or third-party services.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Ready to register your domain?

Search a name, compare extensions and pay once for the years you choose.

.com registration from $18.81 for the first year

Search domains

Keep reading

Domain & DNS Guides

How to Enable DNSSEC and Verify the Result

Enabling DNSSEC takes two parts, signing the zone and publishing a DS record. Follow the steps, then verify the chain of trust and know how to roll back.

10 min read

Domain & DNS Guides

How to Fix a Website That Went Down After a Nameserver Change

A nameserver change moves your whole DNS zone to a new place. Learn why sites break afterwards and how to diagnose and fix the problem step by step.

10 min read

Domain & DNS Guides

What Is DNSSEC, and Does an Ordinary Website Need It?

DNSSEC signs DNS answers so resolvers can detect tampering. Here is what it does, what it cannot do, and how to decide whether a normal website needs it.

9 min read