Visual RFC.
ALL RFCs / RFC 1035
Read the RFC ↗
RFC 1035 / PROTOCOL MECHANISMS

Encode labels and records

02

DNS names use length-prefixed labels ending with the zero-length root label.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

DIAGRAM§ 3.1 ↗
RFC 1035 · § 3.1EXAMPLE
3 / 3
Encode labels and recordsDNS names use length-prefixed labels ending with the zero-length root label.www.example.org.3www7example3org0length / label · length / label · rootTYPE / CLASS / TTL / RDLENGTHRDATAEncoded names are bounded; labels are not dot-separated on wire
03
Attach typed record fields and their data.

Attach typed record fields and their data.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

An ordinary label is at most 63 octets; the full encoded name is at most 255.

  • An ordinary label is at most 63 octets; the full encoded name is at most 255.
  • Resource records add TYPE, CLASS, TTL, RDLENGTH, and type-specific RDATA.
DETAILS

The drawing is a simplified worked example. Follow the linked RFC and its updates for implementation requirements.

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. Read a DNS message envelope
  2. Encode labels and records
  3. Compress a repeated name suffix
  4. Switch transport when a response is truncated
  5. Load an authoritative zone file
RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗