Visual RFC.
ALL RFCs / RFC 3986
Read the RFC ↗
RFC 3986 / RELATIVE REFERENCES

Resolve a relative reference

03

Resolution merges a reference with a base URI and removes dot segments in the defined order.

RFC 3986 · § 5.2EXAMPLE
4 / 4
04
Keep the new query.

The result is https://example.org/a/d?x=1.

Resolve a relative referenceA path changes from base segments through a merged dot-segment path to the resolved absolute URI.Resolve ../d?x=1 against a basehttps://example.org/a/b/cbase URIa/d/a/dremove the b / .. pairhttps://example.org/a/d?x=1

Key idea: A relative reference needs a base.

Terms

Look up a term in the glossary ↗

Rules & examples
  • A reference with its own scheme replaces the base’s scheme-dependent parts.
  • A relative path is merged with the base path, usually replacing its last segment.
  • Dot-segment removal is part of the resolution algorithm, not a general string replacement.

The examples simplify the wire representation. Follow the linked specification and application profile for implementation.

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

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

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 3986

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 ↗