DNS & domains · Offline reference

DNS Record Reference

Choose a DNS record by the question its data answers. A host address, a mail-routing rule and an alias each have different fields, even when their owner names look similar in a zone file.

Inputs

Result

Matching types
11
Calculated or matching entries
TypeCodePurposeExample RDATA
A1IPv4 host address192.0.2.80
NS2Authoritative name serverns1.example.net.
CNAME5Canonical name for an aliaswww.example.net.
SOA6Zone authority and timersns1.example.net. hostmaster.example.net. 1 3600 600 604800 300
PTR12Domain name pointerhost.example.net.
MX15Mail exchange preference and host10 mail.example.net.
TXT16One or more character strings"example text"
AAAA28IPv6 host address2001:db8::80
SRV33Priority, weight, port and target10 5 5060 sip.example.net.
CAA257Certification authority authorization0 issue "ca.example"
HTTPS65Service binding for HTTPS1 svc.example.net.

Examples show record data only. Owner name, TTL and class belong to the surrounding resource record.

In this guide11 sections

Introduction

Choose a DNS record by the question its data answers. A host address, a mail-routing rule and an alias each have different fields, even when their owner names look similar in a zone file.

Method and concepts

A resource record associates an owner name, a type and a class with type-specific data. The time to live (TTL) states a caching interval in seconds. Records sharing an owner, class and type form a record set. A resolver requests a particular type for a name.

  1. Search for a record mnemonic such as A, AAAA or MX. Read what the record stores, then identify the owner name for your example.
  2. Separate the fields belonging to the record from any subsequent name resolution. For example, an MX target is a host name whose address is obtained separately.

DNS records, delegation and caching diagram

  1. Application stub
  2. Recursive resolver
  3. Parent zone · NS referral
  4. Child authority · A or AAAA
This is the path for an uncached delegation and answer in a simplified example. A resolver with a usable cached answer can reply immediately.

Worked examples

Read a two-stage mail-routing entry

  1. Read “example.org. 3600 IN MX 10 mail.example.org.” as an MX record for example.org. Its preference is 10, its target is mail.example.org., and 3600 seconds equals one hour.
  2. Read “mail.example.org. 300 IN A 192.0.2.25” as a separate IPv4 address record for the target. Its TTL is five minutes.
  3. If a second MX has preference 20, senders normally try the lower preference first. The target name and its address can be updated and cached on different schedules.

DNS records, delegation and caching: Read a delegated lab zone and its five-minute TTL

  1. In a teaching copy of example.org, delegate lab.example.org to ns1.lab.example.org. Supply 192.0.2.53 as parent glue so the resolver can reach the child authority.
  2. The child publishes sensor.lab.example.org with A 192.0.2.40 and AAAA 2001:db8::40, each with TTL 300 seconds. The resolver queries the requested type and caches its answer.
  3. An A answer cached at 10:00:00 has about 180 seconds left at 10:02:00, assuming an unaltered TTL and ordinary cache operation. An edit at 10:01:00 does not invalidate that cached copy.

Reference table

DNS Record Reference reference
Question about a nameTypeData to read
IPv4 address?A32-bit IPv4 address
IPv6 address?AAAA128-bit IPv6 address
Mail exchange?MXPreference and exchange name
Alias for which name?CNAMECanonical target name

Reading the result

The reference describes record types. To review a supplied zone excerpt, parse the owner and TTL first, then apply the rules for that type’s data. A trailing dot in zone-file notation makes a domain name absolute, avoiding accidental addition of the zone origin.

Common mistakes

  • An MX record requires a host name after the preference. Writing an IP address there does not supply the target’s address record.
  • A TTL of 300 counts seconds. Previously cached values may persist until their earlier TTL expires.

Frequently asked questions

Can one host name have both A and AAAA records?

Yes. The A record set contains IPv4 addresses and the AAAA record set contains IPv6 addresses. The two sets have distinct types.

How does a CNAME differ from an address record?

A CNAME names another domain as the canonical target. A resolver seeking an address follows that name and looks for the requested address type.

Does querying AAAA require sending DNS over IPv6?

No. The requested record type and the transport address family are independent. An IPv4 connection to a resolver can carry a query for an IPv6 address.

Why can a newly created record still appear missing?

A resolver may have cached an earlier negative response. Check which authority now serves the zone and the remaining negative cache lifetime.

What is the difference between a recursive resolver and an authoritative server?

A recursive resolver finds or returns an answer for a client and can cache it. An authoritative server publishes records for zones for which it is responsible.

Does an empty answer always mean a domain does not exist?

No. A name can exist without the requested record type. NXDOMAIN means the queried name does not exist; NODATA means the name exists but lacks that type, while timeouts and SERVFAIL are different failures.

Can a DNS name have both a CNAME and other data at the same owner?

A CNAME owner is an alias and generally cannot also carry ordinary record data at that same name, aside from protocol-defined exceptions such as DNSSEC-related records.

Does changing an authoritative record immediately change every cached answer?

No. Recursive caches can retain an older answer for its remaining TTL, and negative answers can also be cached. Different resolvers may refresh at different times.

What does delegation do in DNS?

A parent zone publishes delegation data that identifies authoritative name servers for a child zone. Recursive resolution follows that chain to ask the child's authority for its records.

Does an authoritative answer mean a server is the only place with the data?

No. The authoritative zone is the source of published data, while recursive resolvers and client caches can hold copies until their cache lifetimes expire.

Can a DNS record have a zero TTL?

A zero TTL tells compliant caches not to retain the answer for a positive caching interval. It does not guarantee instant observation everywhere or bypass other layers of caching.

Why is a CNAME target written as a domain name rather than an IP address?

A CNAME points one DNS name to another canonical DNS name. The target can then have its own A or AAAA records and be updated independently.

What does an SOA record describe?

An SOA record identifies core zone authority information and includes a serial plus refresh, retry, expire, and negative-cache timing fields. Its values guide secondary servers and some resolver behavior.

What does an MX preference number mean?

Lower numeric preference values are tried before higher values. If multiple MX records share a preference, senders can distribute attempts among them according to implementation policy.

Can a TXT record contain multiple strings?

Yes. DNS TXT RDATA can consist of one or more character strings. Applications may concatenate or interpret those strings according to their own rules.

How is a PTR record name found from an IPv4 address?

The octets are reversed and appended to in-addr.arpa. For IPv6, the address's nibbles are reversed under ip6.arpa.

Does TTL control how long a domain registration lasts?

No. DNS TTL controls caching of a resource record. Domain registration expiry is a separate registry and registrar concept.

Further learning and references