Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

DNS Resource Record Field Reference

Direct answer

All DNS data is resource records: a name, a type, a class, a time to live and the data. The type decides what the data is — A and AAAA hold addresses, CNAME an alias, MX mail servers, NS name servers, PTR a name for an address, TXT free text, SRV a service location.

When to use this

Use it when creating or checking records, when mail or a service cannot be found, or when a change takes a long time to be seen.

First 30 seconds

1. dig <name> <type> @<authoritative server> +norecurse — is the record there, with the right data?

2. dig <name> <type> through the resolver — same answer? If not, how much time to live remains?

3. Mail failing → dig <domain> MX, then check that each target has an address record.

4. A CNAME where other records are needed → not allowed; use address records.

Operational verification

record exists on the zone's servers with the right type and data → resolvers fetch it → cached copies expire within the time to live → clients receive the current record

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commanddig www.example.com A
Scope / prerequisiteUse it when creating or checking records, when mail or a service cannot be found, or when a change takes a long time to…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
dig www.example.com A
dig example.com MX +short
dig example.com TXT +short
dig -x 192.0.2.10
dig www.example.com A @ns1.example.com +norecurse

In dig output, each record is printed as name, TTL, class, type, data. Asking a resolver shows the remaining TTL counting down in its cache; asking the zone's own server shows the configured TTL. -x does a reverse lookup. A CNAME shows in the answer section followed by the records of the name it points to.

Known-good: the record of the expected type is returned with the intended data, from the zone's own servers and from the resolver in use.

Step 2 Failure isolation workflow Narrow the fault
  • A change is not visible. Caches still hold the old record; compare the answer from the zone's own server with the resolver's, and note the TTL.
  • A CNAME at the zone's top level is rejected or breaks mail. It is not allowed there; use address records or the provider's alias feature.
  • Mail does not arrive. The MX points to a name without an address record, to a CNAME, or to an IP address.
  • A name resolves to something with the zone name appended twice. A missing trailing dot in the zone file.
  • A service is not found. The SRV record's name — service and protocol labels included — or its port is wrong.
  • Reverse lookups fail. The PTR record lives in a different zone, usually managed by whoever owns the address range.
  • Some clients get one address, others another. Several address records exist for the name; that is rotation, not a fault.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

A name with a CNAME can have no other records — so no CNAME at the top of a zone. MX and NS must point to names with address records, not to aliases or IP addresses. A change becomes visible as caches expire: up to one full time to live.

Key checks
  • dig <name> A / AAAA / MX / TXT — the records with their time to live.
  • dig <domain> MX +short — just the data.
  • dig -x <address> — reverse lookup.
  • dig <name> A @<authoritative server> +norecurse — the configured record and its full time to live.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

All DNS data is stored and sent as resource records. Every record has the same outer form — a name, a type, a class, a time to live and the data — and the type decides what the data part contains: an address, another name, a mail server with a preference, and so on.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

Most DNS mistakes are mistakes about records: a CNAME where none is allowed, a mail record pointing at an alias, a time to live that makes a change take a day to be seen. Knowing what each type holds, and the few rules about combining them, covers nearly all of it.

ReferenceHow it works1 section · depth on demand

How it works

The common form.

FieldMeaning
NameThe name the record belongs to (the owner)
TypeWhat kind of data follows
ClassIN (Internet) in practice
TTLSeconds a resolver may keep the record in its cache
DataDepends on the type

Common types.

TypeDataExample
AAn IPv4 addresswww 3600 IN A 192.0.2.10
AAAAAn IPv6 addresswww 3600 IN AAAA 2001:db8::10
CNAMEAnother name: "this name is an alias for that one"shop 3600 IN CNAME www.example.com.
MXA preference and the name of a mail server; lowest preference is tried first@ 3600 IN MX 10 mail.example.com.
NSThe name of a server responsible for the zone@ 86400 IN NS ns1.example.com.
SOAAdministrative data about the zoneone per zone
PTRA name, for looking up an address in reverse10.2.0.192.in-addr.arpa. IN PTR www.example.com.
SRVPriority, weight, port and server name for a service_sip._tcp 3600 IN SRV 10 60 5060 sip.example.com.
TXTFree text; used for SPF, domain verification and similar@ IN TXT "v=spf1 mx -all"

Rules that cause the common errors.

  • A CNAME stands alone. A name that has a CNAME cannot have any other record. For that reason a CNAME cannot be placed at the top of a zone, which always has SOA and NS records.
  • MX and NS point to names with address records — not to an IP address, and not to a CNAME.
  • A trailing dot matters in zone files. mail.example.com. is complete; mail.example.com without the dot has the zone name appended.
  • Several records of the same name and type form a set and are returned together, usually in rotating order. They share one TTL.

TTL. A resolver that has fetched a record answers from its cache until the TTL runs out and does not ask again in between. A change therefore becomes visible gradually, as caches expire — up to one full TTL after the change. Lowering the TTL helps only if done at least one old TTL before the change.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Resource record structure

All DNS data is stored and sent as resource records with one common outer format. RFC 1035 defines the fields:

  • NAME: the owner name.
  • TYPE (2 bytes): the record type.
  • CLASS (2 bytes): almost always IN.
  • TTL (32-bit unsigned): how many seconds the record may be cached, where 0 means don't cache.
  • RDLENGTH (16 bits): the length of the data.
  • RDATA: the data itself, whose format depends on the type.

Common record types

TypeNumberRDATASource
A1IPv4 addressRFC 1035
NS2Name server nameRFC 1035
CNAME5Canonical nameRFC 1035
SOA6Zone parametersRFC 1035
PTR12Name (reverse lookups)RFC 1035
MX15Preference + mail server nameRFC 1035
TXT16Text stringsRFC 1035
AAAA28IPv6 addressRFC 3596
SRV33Priority, weight, port, targetRFC 2782
OPT41EDNS pseudo-recordRFC 6891
DS, RRSIG, NSEC, DNSKEY43, 46, 47, 48DNSSECRFC 4034

Name compression (RFC 1035)

Names in a message can point back to an earlier occurrence instead of being repeated. A pointer is two bytes: the first two bits are 1, and the remaining 14 bits give the offset from the start of the message. That is why c0 0c appears so often in hex dumps. It points to offset 12, the question name.

host$ dig www.example.net A +noall +answer
www.example.net.        287     IN      A       192.0.2.40
host$ dig example.net MX +noall +answer
example.net.            3600    IN      MX      10 mail1.example.net.
host$ dig example.net TXT +short | grep spf
host$ dig -x 192.0.2.40 +short
www.example.net.
host$ tshark -r dns.pcap -Y "dns.flags.response==1" -T fields -e dns.resp.name -e dns.resp.type -e dns.resp.ttl | head

Reading TTLs

The TTL in an answer from a recursive resolver counts down while the record sits in the cache. Two queries a minute apart show TTLs about 60 seconds lower. The authoritative server always returns the full configured TTL. That makes it easy to tell whether an answer came from cache.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 1034

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → DNS Resource Record Field Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc1034.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
dns resource record fieldsdns ttlrdata
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

DNS RR Fields

NAME/TYPE/CLASS/TTL/RDATA.

30-second lookup

  • Open Packet Field Explorer for field-level metadata.
  • Use Packet Decoders for bit/flag values where relevant.
  • Use Paste Output / Structured Parser for CLI evidence.
  • Use Packet Filters to prove the wire boundary.

Evidence rule

A decoded field proves what is present in that packet/output at that moment. Continue through the verification chain before concluding end-to-end behavior.

Confirmation

Confirm action

Continue?