Uniform Resource Name (URN)
A Uniform Resource Name (URN) is a type of URI
identifying a resource by a globally unique, persistent
name. A URN always uses the urn scheme and provides
no information about how or where to access the resource.
Format
The URN syntax follows this structure:
urn:<NID>:<NSS>
The Namespace Identifier (NID) names the namespace. NIDs are case-insensitive and registered with IANA. The Namespace-Specific String (NSS) identifies the resource within the namespace. The combination of NID and NSS guarantees global uniqueness.
A URN is allowed to carry optional components after the NSS:
- r-component: resolution parameters, prefixed by
?+ - q-component: query passed to the resolved resource,
prefixed by
?= - f-component: fragment identifier, prefixed by
#
urn:example:resource?+res-param?=query#fragment
Note
A URN is not a locator. No protocol, access method, or network location is required. A URN identifies a resource persistently, even if the resource moves or becomes unavailable.
Namespaces
IANA maintains two categories of registered URN namespaces:
Formal namespaces
Formal namespaces serve a broad community of users and go through a structured registration process. The NID is a meaningful string chosen by the registrant. Well-known formal namespaces include:
| NID | Purpose |
|---|---|
isbn |
International Standard Book Numbers |
issn |
International Standard Serial Numbers |
ietf |
IETF documents and standards |
oid |
Object Identifiers (ISO/ITU-T) |
uuid |
Universally Unique Identifiers |
Informal namespaces
Informal namespaces follow a simpler registration process.
IANA assigns the NID as the prefix urn- followed by a
number (e.g., urn-7). The registrant does not choose the
NID. Informal namespaces carry the same rights and
responsibilities as formal ones.
The full list of registered namespaces is available in the IANA URN Namespaces registry.
Examples
These examples show the URN scheme identifying resources by name. No location or access method is specified.
A URN identifying an IETF RFC
urn:ietf:rfc:7230
The ietf namespace identifies IETF documents. The NSS
rfc:7230 refers to the original HTTP/1.1
Message Syntax and Routing specification, since
superseded.
A URN identifying a book by ISBN
urn:isbn:0451450523
The isbn namespace maps to International Standard Book
Numbers. This URN persistently identifies the book
regardless of which retailer or library holds a copy.
A URN containing a UUID
urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
The uuid namespace wraps a Universally Unique Identifier,
providing a URN for resources identified by UUID.
Resolution
A URN on its own does not describe how to retrieve the resource. Resolution is the process of translating a URN into one or more URLs or other metadata. Resolution services (such as Handle System, DOI, or application-specific resolvers) map URNs to current resource locations.
Not every URN has a resolver. Many URNs serve purely as stable identifiers within databases, catalogs, and XML namespaces.
Takeaway
A Uniform Resource Name (URN) is a type of URI
assigning a persistent, location-independent name to a
resource. The urn scheme, a registered NID, and an NSS
combine to form a globally unique identifier. URN
remains a valid and actively registered URI
scheme.
See also
- RFC 8141: Uniform Resource Names (URNs)
- IANA URN Namespaces registry
- Uniform Resource Identifier
- Uniform Resource Locator
- Percent-Encoding
- HTTP headers