Uniform Resource Identifier

A uniform resource identifier (URI) is a character sequence that identifies a resource according to a defined syntax. The concept of a resource is intentionally abstract and may denote an information object, a physical entity, a conceptual relationship, or a service whose state changes over time. Identification does not imply that the resource can be retrieved through a network, nor does it require the identifier to describe the resource’s location.

URI syntax provides a common framework within which individual URI schemes assign meaning to identifiers. An https URI ordinarily participates in retrieval through the Hypertext Transfer Protocol, whereas a urn URI identifies a resource within a persistent naming system. Both conform to the same generic grammar despite differing in operational interpretation.

The term was standardized through the Internet Engineering Task Force (IETF) and is defined principally by RFC 3986. URIs form a fundamental component of the World Wide Web, where they connect representations, protocol operations, and references embedded in documents.

Conceptual model

A URI performs identification by associating a sequence of characters with a resource under the rules of a registered or provisionally defined scheme. The association may depend on an administrative namespace, a network protocol, or a locally established convention. Consequently, the generic syntax determines how a URI is parsed but does not by itself determine what the URI identifies.

The distinction between a resource and a representation is central to the Web architecture. A resource is the entity identified by the URI, while a representation is a sequence of data expressing the resource’s current or selected state. A single resource may have representations in different media types or natural languages, and its representations may vary over time without changing the identifying URI.

Dereferencing is an operation that uses a URI to obtain information associated with its resource. This operation is defined for schemes that support access, but it is not a general requirement of URI identity. A URI may remain meaningful when no dereferencing mechanism exists, when access is restricted, or when the identified resource has no digital representation.

URI identity is based primarily on character sequences interpreted under scheme-specific and generic rules. Two distinct URIs may nevertheless identify the same resource, while two character sequences that appear similar may remain distinct after parsing. The generic standard therefore defines limited equivalence mechanisms rather than a universal procedure for determining whether arbitrary identifiers denote the same resource.

Generic syntax

RFC 3986 expresses the principal syntax as follows:

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

The scheme appears at the beginning and establishes the identifier’s interpretive context. Scheme names begin with an ASCII letter and may contain a restricted set of additional characters. Their comparison is case-insensitive, although lowercase spelling is conventionally used in normalized forms.

The hierarchical part may contain an authority component followed by a path, or it may contain a path without an authority. An authority commonly includes a host and may also include user-information or a port number. The precise significance of these fields depends on the scheme, so the presence of an authority does not independently establish a network operation.

The path organizes data into a hierarchical sequence whose segments are separated by slash characters. In network-oriented schemes, it often participates in locating a resource relative to an authority, but the generic syntax does not assign a universal file-system interpretation to it. Empty segments and segments containing encoded data remain syntactically meaningful when permitted by the applicable scheme.

A query component follows a question mark and contains non-hierarchical data associated with the identified resource. Its internal organization is not fixed by the URI standard. Web applications frequently interpret query data as parameter assignments, but this convention arises from application formats rather than from the generic URI grammar.

A fragment component follows a number sign and identifies a secondary resource in relation to the primary resource. Fragment semantics depend on the media type or representation context rather than solely on the URI scheme. During ordinary network retrieval, the fragment is separated before the request is transmitted, after which client-side processing applies it to the obtained representation.

URI references and relative resolution

A URI reference may contain a complete URI or a relative reference. A complete URI includes a scheme, whereas a relative reference derives part of its interpretation from a base URI. Relative references allow documents to express relationships without repeating a shared scheme, authority, and path prefix.

Resolution combines a relative reference with a base URI according to a deterministic transformation. The operation may inherit the base authority, merge path segments, and remove special dot segments representing hierarchical traversal. Query data can be inherited under narrowly defined conditions, while a fragment in the reference remains associated with the resulting identifier.

Resolution is a syntactic operation and does not inspect a remote resource. Its result therefore does not depend on whether the derived URI is dereferenceable or whether the referenced entity exists. This separation allows relative links to be transformed consistently before any protocol interaction occurs.

A base URI may be established by the retrieval context, by metadata associated with a representation, or by a declaration within a document format. HTML, for example, defines how a document base affects embedded links while relying on the generic URI resolution model for the underlying transformation.

Character encoding and normalization

The generic syntax is defined in terms of a restricted character repertoire derived from ASCII. Certain characters act as structural delimiters, while unreserved characters may appear as data without encoding. Other data can be represented through percent-encoding, in which an octet is written as a percent sign followed by two hexadecimal digits.

Percent-encoding represents octets rather than abstract Unicode characters. A scheme or protocol determines how textual data is converted into octets before that encoding is applied. Modern Web formats generally use UTF-8, but the generic URI syntax does not retroactively impose a single character encoding on every identifier namespace.

An internationalized resource identifier (IRI) extends the identifier model by permitting a substantially broader range of Unicode characters. Conversion between an IRI and URI form encodes characters that cannot occur directly in URI syntax. The two forms can denote the same resource while serving different requirements for display, storage, and protocol interchange.

Normalization reduces syntactic variation without asserting unrestricted semantic equivalence. Case normalization can standardize the spelling of scheme and host components, while percent-encoding normalization can replace encoded unreserved characters with their literal forms. Path normalization may remove dot segments when hierarchical interpretation permits it. Scheme-specific rules can define additional transformations, but transformations that lack such authorization can change the identified resource.

Relationship to URLs and URNs

A uniform resource locator (URL) is a URI whose scheme provides a means of locating or accessing a resource. A Uniform Resource Name (URN) is a URI constructed within the urn scheme and assigned according to a defined namespace. These terms describe functions or namespace structures within the URI framework rather than mutually exclusive syntactic classes established by the generic grammar.

The historical distinction associated URLs with location and URNs with persistent naming. In operational systems, that division is incomplete because a locator can remain stable and a name may rely on resolution infrastructure. RFC 3986 consequently treats “URI” as the general term and retains “URL” as an informal characterization of identifiers associated with access mechanisms.

The WHATWG URL Standard defines a related parsing model for browser and Web-platform behavior. Its algorithms accommodate existing content and specify stateful processing for forms that do not always conform to RFC 3986. A browser’s URL record and an RFC URI therefore overlap extensively but are not identical abstractions.

Historical development

The identifier architecture originated in the early design of the World Wide Web. Tim Berners-Lee described universal document identifiers as part of a system in which documents and services could be referenced independently of the document containing the reference. This work developed into the concept of universal resource identifiers and was documented in RFC 1630 in 1994.

Standards for specific identifier categories appeared alongside the generic model. Larry Masinter was an editor of RFC 1738, which documented URL schemes in 1994, while Roy Fielding authored RFC 1808 on relative URLs in 1995. RFC 2141 subsequently defined the original URN syntax, and RFC 2396 consolidated the generic URI syntax in 1998.

Revision of RFC 2396 addressed ambiguities in parsing, reference resolution, host syntax, and component boundaries. The generic-syntax specification that resulted was edited by Berners-Lee, Fielding, Masinter, and You Watanabe, and it was published as RFC 3986 in January 2005. The revision formalized the current distinction between a URI and a URI reference, specified a resolution algorithm, and separated generic syntax from the operational behavior of individual schemes.

Later standards developed particular parts of the framework without replacing its central grammar. RFC 3987 defined IRIs, while RFC 8141 revised the syntax and interpretation of URNs. URI scheme registration procedures also changed as the IETF refined the relationship between permanent registrations, provisional registrations, and historically documented schemes.

Scheme governance

A URI scheme supplies semantics that the generic syntax deliberately leaves undefined. A scheme specification ordinarily defines the structure of its scheme-specific data, the conditions under which two identifiers are equivalent, and any operations associated with dereferencing. It also defines how identifiers interact with relevant security and encoding models.

The Internet Assigned Numbers Authority maintains the registry of URI schemes under IETF procedures. Registration records preserve scheme names and point to their defining specifications. Registration does not establish that every syntactically valid identifier corresponds to an existing resource, because resource assignment remains a function of each scheme and its administrative environment.

Some schemes are closely associated with network protocols, while others identify data or namespace entries without an independent retrieval exchange. The data scheme embeds a representation within the identifier itself. The mailto scheme identifies an Internet mail address and can initiate composition behavior without representing a general-purpose retrieval protocol. These differences illustrate why scheme semantics cannot be derived from generic URI structure alone.

Use in Web architecture

On the Web, URIs connect representations through hyperlinks and provide targets for protocol methods. An HTTP URI identifies a resource within an origin determined by its scheme, host, and effective port. The path and query contribute to resource selection under the authority’s control, while the fragment remains outside the HTTP request target’s resource-identification process.

The architecture permits the same URI to participate in several contexts without acquiring a new syntax. It can appear as a hyperlink target, serve as an identifier in structured metadata, or act as a namespace name within an XML document. The interpretation remains constrained by the URI scheme and by the format in which the reference occurs.

Persistent identification depends primarily on administrative continuity rather than on a distinct class of characters. A URI remains stable when the responsible authority maintains its assignment or provides redirection to a successor identifier. The syntax supports this practice but cannot ensure persistence independently of the institution controlling the namespace.

Security properties

URI processing crosses boundaries between textual representation, application interpretation, and network activity. Visually similar characters can produce identifiers that are distinct at the character or encoding level, particularly when internationalized domain names or percent-encoded data are displayed. User-information components can also alter the apparent structure of an authority when interfaces present the identifier incompletely.

Dereferencing may expose information through query data, network logs, browser history, or intermediary systems. Fragment data is normally excluded from an HTTP request, although scripts and client-side applications can process it after retrieval. The security effect therefore depends on the full chain of URI parsing, presentation, protocol use, and application behavior.

Normalization can also affect security boundaries when separate components apply incompatible rules. If an authorization system and a resource server interpret encoded delimiters or path traversal segments differently, they can reach different conclusions about the same character sequence. RFC 3986 limits generic normalization partly because equivalence rules that are valid for one scheme or application are not necessarily valid for another.

See also

  • Domain Name System, which maps host names used by many network-oriented URI schemes to addressing information.
  • Hyperlink, a document relationship that commonly uses a URI reference as its target.
  • Resource Description Framework, a data model that uses IRIs to identify subjects, predicates, and other resources.
  • Semantic Web, an architecture in which globally scoped identifiers support linked statements about resources.
  • Content negotiation, the selection of a representation for a resource according to request metadata.
  • Percent-encoding, the URI mechanism for representing octets that cannot appear directly in a component.
  • Punycode, an encoding used within the internationalized domain-name system rather than as a general replacement for URI percent-encoding.