Visual RFC.
ALL RFCs / RFC 1035
Read the RFC ↗
RFC 1035 / DNS MESSAGES AND FILES

Can we avoid writing the same ending twice?

03

Follow a bookmark to earlier name bytes. Try writing the name in full, then break and repair the bookmark.

RFC 1035 · § 4.1.4EXAMPLE
1 / 4 · This ending has already been written

example.org. starts at byte12 in this message.

Two names share the same ending

example.org.Already in the question

www.example.org.Needed again in the answer owner

Can the second name borrow those earlier bytes?

What happens if you change this?

Make one change, then watch again. Restart restores the original example.

3 / 3
03
A pointer refers back to the existing example.org suffix.

A pointer refers back to the existing example.org suffix.

Can we avoid writing the same ending twice?Follow a bookmark to earlier name bytes. Try writing the name in full, then break and repair the bookmark.ONE DNS MESSAGEoffset 20: 7 example 3 org 03 www11 + offset 20A pointer replaces the repeated suffixThe 14-bit pointer offset is within this DNS message

Key idea: A compression pointer borrows an earlier name ending inside the same message; it does not change the name.

Terms
compression pointer
A two-byte instruction to read a name ending elsewhere in this message.
byte offset
A position counted from the first message byte, starting at zero.
hexadecimal
A way of writing numbers using0–9 and A–F; C0 0C are bytes192 and12.

Look up a term in the glossary ↗

Rules & examples

A compression pointer saves bytes without changing the name.

These reference examples may differ from the selected experiment.

  • A compression pointer uses the top two bits 11 and a 14-bit message offset.
  • Parsing must remain bounded; a malformed pointer must not cause unbounded traversal.

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

The question at offset12 is example.org. A/IN. An answer owner at offset29 is www plus a pointer to12, or the whole uncompressed name. C0 0C has top bits11 and a14-bit offset12 counted from the message ID field, excluding any TCP prefix. NAME pointers are permitted here; not every new record type permits compression inside its RDATA. The decoder detects bounds errors, loops, reserved label forms and expanded length, with bounded work. Invalid pointer fixtures deliberately fail; this is not a production parser. The rest of the answer is TYPE A, CLASS IN, TTL60, RDLENGTH4, address192.0.2.20.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

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

All chapters in RFC 1035

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

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

RFC status and corrections ↗