For various purposes such as caching, it is often desirable to
determine if two URNs are "the same". This is done most generally
(i.e., independent of the scheme) by testing for equivalence (see
Section 6.1 of [RFC3986]).
The generic URI specification [RFC3986] is very flexible about
equality comparisons, putting the focus on allowing false negatives
and avoiding false positives. If comparisons are made in a scheme-
independent way, i.e., as URI comparisons only, many URNs that this
specification considers equal would be rejected. The discussion
below applies when the URIs involved are known to be URNs and thus
uses the terms "URN-equivalent" and "URN-equivalence" to refer to
equivalence as specified in this document.
Two URNs are URN-equivalent if their assigned-name portions are
octet-by-octet equal after applying case normalization (as specified
in Section 18.104.22.168 of [RFC3986]) to the following constructs:
1. the URI scheme "urn", by conversion to lower case
2. the NID, by conversion to lower case
3. any percent-encoded characters in the NSS (that is, all character
triplets that match the <pct-encoding> production found in
Section 2.1 of the base URI specification [RFC3986]), by
conversion to upper case for the digits A-F.
Percent-encoded characters MUST NOT be decoded, i.e., percent-
encoding normalization (as specified in Section 22.214.171.124 of [RFC3986])
MUST NOT be applied as part of the comparison process.
If an r-component, q-component, or f-component (or any combination
thereof) is included in a URN, it MUST be ignored for purposes of
URN namespace definitions MAY include additional rules for
URN-equivalence, such as case insensitivity of the NSS (or parts
thereof). Such rules MUST always have the effect of eliminating some
of the false negatives obtained by the procedure above and MUST NOT
result in treating two URNs as not "the same" if the procedure here
says they are URN-equivalent. For related considerations with regard
to NID registration, see below.
This section shows a variety of URNs (using the "example" NID defined
in [RFC6963]) that highlight the URN-equivalence rules.
First, because the scheme and NID are case insensitive, the following
three URNs are URN-equivalent to each other:
Second, because the r-component, q-component, and f-component are not
taken into account for purposes of testing URN-equivalence, the
following three URNs are URN-equivalent to the first three examples
Third, because the "/" character (and anything that follows it) in
the NSS is taken into account for purposes of URN-equivalence, the
following URNs are not URN-equivalent to each other or to the six
Fourth, because of percent-encoding, the following URNs are
URN-equivalent only to each other and not to any of those above (note
that, although %2C is the percent-encoded transformation of "," from
the previous examples, such sequences are not decoded for purposes of
Fifth, because characters in the NSS other than percent-encoded
sequences are treated in a case-sensitive manner (unless otherwise
specified for the URN namespace in question), the following URNs are
not URN-equivalent to the first three URNs:
Sixth, on casual visual inspection of a URN presented in a human-
oriented interface, the following URN might appear the same as the
first three URNs (because U+0430 CYRILLIC SMALL LETTER A can be
confused with U+0061 LATIN SMALL LETTER A), but it is not
URN-equivalent to the first three URNs:
4. URI Conformance
4.1. Use in URI Protocol Slots
Because a URN is, syntactically, a URI under the "urn" scheme, in
theory a URN can be placed in any protocol slot that allows for a URI
(to name just a few, the "href" and "src" attributes in HTML, the
base element in HTML, the "xml:base" attribute in XML [XML-BASE], and
the "xmlns" attribute in XML for XML namespace names [XML-NAMES]).
However, this does not imply that, semantically, it always makes
sense in practice to place a URN in a given URI protocol slot; in
particular, because a URN might not specify the location of a
resource or even point indirectly to one, it might not be appropriate
to place a URN in a URI protocol slot that points to a resource
(e.g., the aforementioned "href" and "src" attributes).
Ultimately, guidelines regarding when it is appropriate to use URIs
under the "urn" scheme (or any other scheme) are the responsibility
of specifications for individual URI protocol slots (e.g., the
specification for the "xml:base" attribute in XML might recommend
that it is inappropriate to use URNs in that protocol slot). This
specification cannot possibly anticipate all of the relevant cases,
and it is not the place of this specification to require or restrict
usage for individual protocol slots.
In part because of the separation of URN semantics from more general
URI syntax, generic URI processors need to pay special attention to
the parsing and analysis rules of RFC 3986 and, in particular, must
treat the URI as opaque unless the scheme and its requirements are
recognized. In the latter case, such processors may be in a position
to invoke scheme-appropriate processing, e.g., by a URN resolver. A
URN resolver can either be an external resolver that the URI resolver
knows of or be functionality built into the URI resolver. Note that
this requirement might impose constraints on the contexts in which
URNs are appropriately used; see Section 4.1.
4.3. URNs and Relative References
Section 5.2 of [RFC3986] describes an algorithm for converting a URI
reference that might be relative to a given base URI into "parsed
components" of the target of that reference, which can then be
recomposed per RFC 3986, Section 5.3 into a target URI. This
algorithm is problematic for URNs because their syntax does not
support the necessary path components. However, if the algorithm is
applied independent of a particular scheme, it should work
predictably for URNs as well, with the following understandings
(syntax production terminology taken from RFC 3986):
1. A system that encounters a <URI-reference> that obeys the syntax
for <relative-ref>, whether it explicitly has the scheme "urn" or
not, will convert it into a target URI as specified in RFC 3986.
2. Because of the persistence and stability expectations of URNs,
authors of documents, etc., that utilize URNs should generally
avoid the use of the "urn" scheme in any <URI-reference> that is
not strictly a <URI> as specified in RFC 3986, specifically
including those that would require processing of <relative-ref>.
4.4. Transport and Display
When URNs are transported and exchanged, they MUST be represented in
the format defined herein. Further, URN-aware applications are
strongly encouraged to offer the option of displaying URNs in this
canonical form to allow for direct transcription (for example by
copy-and-paste techniques). Such applications might support the
display of URNs in a more human-friendly form and might use a
character set that includes characters that are not permitted in URN
syntax as defined in this specification (e.g., when displaying URNs
to humans, such applications might replace percent-encoded strings
with characters from an extended character repertoire such as Unicode
To minimize user confusion, any application displaying URIs SHOULD
display the complete URI (including, for URNs, the "urn" scheme and
any components) to ensure that there is no confusion between URN NIDs
and URI scheme identifiers. For example, a URI beginning with
"urn:xmpp:" [RFC4854] is very different from a URI beginning with
"xmpp:" [RFC5122]. Similarly, a potential Digital Object Identifier
(DOI) URI scheme [DOI-URI] is different from, and possibly completely
unrelated to, a possible DOI URN namespace.
4.5. URI Design and Ownership
As mentioned, the assignment of URNs within a URN namespace is a
managed process, as is the assignment of URN namespaces themselves.
Although design of the URNs to be assigned within a given URN
namespace is ceded by this specification to the URN namespace
manager, doing so in a managed way avoids the problems inherent in
unmanaged generation of URIs as described in the recommendations
regarding URI design and ownership [RFC7320].
5. URN Namespaces
A URN namespace is a collection of names that obey three constraints:
each name is (1) unique, (2) assigned in a consistent way, and (3)
assigned according to a common definition.
1. The "uniqueness" constraint means that a name within the URN
namespace is never assigned to more than one resource and never
reassigned to a different resource (for the kind of "resource"
identified by URNs assigned within the URN namespace). This
holds true even if the name itself is deprecated or becomes
2. The "consistent assignment" constraint means that a name within
the URN namespace is assigned by an organization or created in
accordance with a process or algorithm that is always followed.
3. The "common definition" constraint means that there are clear
definitions for the syntax of names within the URN namespace and
for the process of assigning or creating them.
A URN namespace is identified by a particular NID in order to ensure
the global uniqueness of URNs and, optionally, to provide a cue
regarding the structure of URNs assigned within a URN namespace.
With regard to global uniqueness, using different NIDs for different
collections of names ensures that no two URNs will be the same for
different resources, because each collection is required to uniquely
assign each name. However, a single resource MAY have more than one
URN assigned to it, either in the same URN namespace (if the URN
namespace permits it) or in different URN namespaces, and for either
similar purposes or different purposes. (For example, if a publisher
assigns an ISBN [RFC3187] to an electronic publication and that
publication is later incorporated into a digital long-term archive
operated by a national library, the library might assign the
publication a national bibliography number (NBN) [RFC3188], resulting
in two URNs referring to the same book.) Subject to other
constraints, such as those imposed by the URI syntax [RFC3986], the
rules of the URN scheme are intended to allow preserving the normal
and natural form of names specified in non-URN identifier systems
when they are treated as URNs.
With regard to the structure of names assigned within a URN
namespace, the development of a naming structure (and thereby a
collection of names) depends on the requirements of the community
defining the names, how the names will be assigned and used, etc.
These issues are beyond the scope of URN syntax and the general rules
for URN namespaces, because they are specific to the community
defining a non-URN identifier system or a particular URN namespace
(e.g., the bibliographic and publishing communities in the case of
the "ISBN" URN namespace [RFC3187] and the "ISSN" URN namespace
[RFC3044] or the developers of extensions to the Extensible Messaging
and Presence Protocol [RFC6120] in the case of the "XMPP" URN
Because the colon character (":") is used to separate "urn" from the
NID and the NID from the NSS, it's tempting to think of the entire
URN as being structured by colon characters and to assume that colons
create a structure or hierarchy within the NSS portion of the URN.
Such structure could be specified by a particular NID specification,
but there is no implicit structure. In a URN such as
the NSS string is "apple:pear:plum:cherry" as a whole, and there is
no specific meaning to the colon characters within that NSS string
unless such meaning is described in the specification of the
URN namespaces inherit certain rights and responsibilities by the
nature of URNs, in particular:
1. They uphold the general principles of a well-managed URN
namespace by providing persistent identification of resources and
unique assignment of names in accordance with a common
2. Optionally, they can be registered in global registration
services such as those described in [RFC2483].
There are two types of URN namespaces: formal and informal. These
are distinguished by the expected level of service, the information
needed to define the URN namespace, and the procedures for
registration. Because the majority of the URN namespaces registered
so far have been formal, this document concentrates on formal URN
5.1. Formal URN Namespaces
A formal URN namespace provides benefit to some subset of users on
the Internet. In particular, it would not make sense for a formal
URN namespace to be used only by a community or network that is not
connected to the Internet. For example, it would be inappropriate
for a URN namespace to effectively force someone to use a proprietary
network or service not open to the general Internet user. The intent
is that, while the community of those who might actively use the URNs
assigned within that URN namespace might be small, the potential use
of names within that URN namespace is open to any user on the
Internet. Formal URN namespaces might be appropriate even when some
aspects are not fully open. For example, a URN namespace might make
use of a fee-based, privately managed, or proprietary registry for
assignment of URNs in the URN namespace. However, it might still
benefit some Internet users if the associated services have openly
An organization that will assign URNs within a formal URN namespace
SHOULD meet the following criteria:
1. Organizational stability and the ability to maintain the URN
namespace for a long time; absent such evidence, it ought to be
clear how the URN namespace can remain viable if the organization
can no longer maintain the URN namespace.
2. Competency in URN assignment. This will improve the likelihood
of persistence (e.g., to minimize the likelihood of conflicts).
3. Commitment to not reassigning existing URNs and to allowing old
URNs to continue to be valid (e.g., if the assignee of a URN is
no longer a member or customer of the assigning organization, if
various information about the assignee or named entity happens to
change, or even if the assignee or the named entity itself is no
longer in existence; in all these cases, the URN is still valid).
A formal URN namespace establishes a particular NID, subject to the
following constraints (above and beyond the syntax rules already
1. It MUST NOT be an already-registered NID.
2. It MUST NOT start with "urn-" (which is reserved for informal URN
3. It MUST be more than two characters long, and it MUST NOT start
with ALPHA ALPHA "-", i.e., any string consisting of two letters
followed by one hyphen; such strings are reserved for potential
use as NIDs based on ISO alpha-2 country codes [ISO.3166-1] for
eventual national registrations of URN namespaces (however, the
definition and scoping of rules for allocation of responsibility
for such country-code-based URN namespaces are beyond the scope
of this document). As a consequence, it MUST NOT start with the
string "xn--" or any other string consisting of two letters
followed by two hyphens; such strings are reserved for potential
representation of DNS A-labels and similar strings in the future
4. It MUST NOT start with the string "X-" so that it will not be
confused with or conflict with any experimental URN namespace
previously permitted by [RFC3406].
Applicants and reviewers considering new NIDs should also be aware
that they may have semantic implications and hence be a source of
conflict. Particular attention should be paid to strings that might
be construed as identifiers for, or registered under the authority
of, countries (including ISO 3166-1 alpha-3 codes) and to strings
that might imply association with existing URI schemes, non-URN
identifier systems, or trademarks. However, in line with traditional
policies, disputes about "ownership" of particular strings are
disagreements among the parties involved; neither IANA nor the IETF
will become involved in such disputes except in response to orders
from a court of competent jurisdiction.
5.2. Informal URN Namespaces
Informal URN namespaces are full-fledged URN namespaces, with all the
associated rights and responsibilities. Informal URN namespaces
differ from formal URN namespaces in the process for assigning the
NID: for an informal URN namespace, the registrant does not designate
the NID; instead, IANA assigns the NID consisting of the string
"urn-" followed by one or more digits (e.g., "urn-7") where the
digits consist of the next available number in the sequence of
positive integers assigned to informal URN namespaces. Thus, the
syntax of an informal URN namespace identifier is:
InformalNamespaceName = "urn-" Number
Number = DigitNonZero 0*Digit
DigitNonZero = "1"/ "2" / "3" / "4"/ "5"
/ "6" / "7" / "8" / "9"
Digit = "0" / DigitNonZero
The only restrictions on <Number> are that it (1) consist strictly of
ASCII digits, (2) not have leading zeros, and (3) not cause the NID
to exceed the length limitations defined for the URN syntax (see
6. Defining and Registering a URN Namespace
Because the space of URN namespaces is itself managed, the definition
of a URN namespace SHOULD pay particular attention to:
1. The purpose of the URN namespace.
2. The syntax of URNs assigned within the URN namespace, including
the internal syntax and anticipated effects of r-components or
q-components. (The syntax and interpretation of f-components are
defined in RFC 3986.)
3. The process for assigning URNs within the URN namespace.
4. The security implications of assigning URNs within the URN
namespace and of using the assigned URNs.
5. Any potential interoperability issues with URNs assigned within
the URN namespace.
6. Optionally, the process for resolving URNs assigned within the
The section on completing the template (Section 6.4) explains these
matters in greater detail. Although the registration templates are
the same in all cases, slightly different procedures are used
depending on the source of the registration.
6.2. Registration Policy and Process: Community Registrations
The basic registration policy for URN namespaces is Expert Review as
defined in the IANA Considerations document [RFC5226]. For URN
namespaces or their definitions that are intended to become standards
or constituent parts of standards, the output of the Expert Review
process is intended to be a report rather than instructions to IANA
to take action (see below). The key steps are:
1. Fill out the URN namespace registration template (see Section 6.4
and Appendix A). This can be done as part of an Internet-Draft
or a specification in another series, although that is not a
2. Send the completed template to the firstname.lastname@example.org discussion list
3. If necessary to address comments received, repeat steps 1 and 2.
4. If the Designated Experts approve the request and no
standardization action is involved, the IANA will register the
requested NID. If standardization is anticipated, the Designated
Experts will prepare a report and forward it to the appropriate
standards approval body (the IESG in the case of the IETF); IANA
will register the requested NID only after receiving directions
from that body and a copy of the Expert Review report.
A URN namespace registration can be revised by updating the
registration template, following the same steps outlined above for
new registrations. A revised registration MUST describe differences
from prior versions and SHOULD make special note of any relevant
changes in the underlying technologies or URN namespace management
Experience to date with URN namespace registration requests has shown
that registrants sometimes do not initially understand some of the
subtleties of URN namespaces and that defining the URN namespace in
the form of a specification enables the registrants to clearly
formulate their "contract" with the intended user community.
Therefore, although the registration policy for formal URN namespaces
is Expert Review and a specification (as distinct from the
registration template) is not strictly required, registrants SHOULD
provide a stable specification documenting the URN namespace
definition and expanding upon the issues described herein.
Because naming can be difficult and contentious, URN namespace
registrants and the Designated Experts are strongly encouraged to
work together in a spirit of good faith and mutual understanding to
achieve rough consensus (see [RFC7282]) on handling registration
requests. They are also encouraged to bring additional expertise
into the discussion if that would be helpful in providing perspective
or otherwise resolving issues.
Especially when iterations in the registration process are prolonged,
Designated Experts are expected to take reasonable precautions to
avoid "race conditions" on proposed NIDs and, if such situations
arise, to encourage applicants to work out any conflicts among
6.3. Registration Policy and Process: Fast Track for Standards
Development Organizations, Scientific Societies, and Similar
The IETF recognizes that situations will arise in which URN
namespaces will be created to either embed existing and established
standards, particularly identifier standards, or reflect knowledge,
terminology, or methods of organizing information that lie well
outside the IETF's scope or the likely subject matter knowledge of
its Designated Experts. In situations in which the registration
request originates from, or is authorized by, a recognized standards
development organization, scientific society, or their designees, a
somewhat different procedure is available at the option of that body:
1. The URN namespace registration template is filled out and
submitted as in steps 1 and 2 of Section 6.2.
2. A specification is required that reflects or points to the needed
external standards or specifications. Publication in the RFC
Series or through an IETF process (e.g., posting as an Internet-
Draft) is not expected and would be appropriate only under very
3. The reviews on the discussion list and by the Designated Experts
are strictly advisory, with the decisions about what advice to
accept and the length of time to allocate to the process strictly
under the control of the external body.
4. When that body concludes that the application is sufficiently
mature, its representative(s) will request that IANA complete the
registration for the NID, and IANA will do so.
Decisions about whether to recognize the requesting entity as a
standards development organization or scientific society are the
responsibility of the IESG.
A model similar to this has already been defined for recognized
standards development organizations that wish to register media
types. The document describing that mechanism [RFC6838] provides
somewhat more information about the general approach.
6.4. Completing the Template
A template for defining and registering a URN namespace is provided
in Appendix A. This section describes considerations for completing
The "Purpose" section of the template describes matters such as:
1. The kinds of resources identified by URNs assigned within the URN
2. The scope and applicability of the URNs assigned within the URN
namespace; this might include information about the community of
use (e.g., a particular nation, industry, technology, or
organization), whether the assigned URNs will be used on public
networks or private networks, etc.
3. How the intended community (and the Internet community at large)
will benefit from using or resolving the assigned URNs.
4. How the URN namespace relates to and complements existing URN
namespaces, URI schemes, and non-URN identifier systems.
5. The kinds of software applications that can use or resolve the
assigned URNs (e.g., by differentiating among disparate URN
namespaces, identifying resources in a persistent fashion, or
meaningfully resolving and accessing services associated with the
6. Whether resolution services are available or will be available
(and, if so, the nature or identity of the services). Examples
of q-component and (when they are standardized) r-component
semantics and syntax are helpful here, even if detailed
definitions are provided elsewhere or later.
7. Whether the URN namespace or its definition is expected to become
a constituent part of a standard being developed in the IETF or
some other recognized standards body.
The "Syntax" section of the template contains:
1. A description of the structure of URNs within the URN namespace,
in conformance with the fundamental URN syntax. The structure
might be described in terms of a formal definition (e.g., using
ABNF [RFC5234]), an algorithm for generating conformant URNs, or
a regular expression for parsing the name into constituent parts;
alternatively, the structure might be opaque.
2. Any special character encoding rules for assigned URNs (e.g.,
which character ought to always be used for quotes).
3. Rules for determining URN-equivalence between two names in the
URN namespace. Such rules ought to always have the effect of
eliminating false negatives that might otherwise result from
comparison. If it is appropriate and helpful, reference can be
made to particular equivalence rules defined in the URI
specification [RFC3986] or to Section 3 of this document.
Examples of URN-equivalence rules include equivalence between
uppercase and lowercase characters in the NSS, between hyphenated
and non-hyphenated groupings in the name, or between single
quotes and double quotes. There may also be namespace-specific
special encoding considerations, especially for URNs that contain
embedded forms of names from non-URN identifier systems. (Note
that these are not normative statements for any kind of best
practice related to handling of relationships between characters
in general; such statements are limited to one particular URN
4. Any special considerations necessary for conforming with the URN
syntax. This is particularly applicable in the case of existing,
non-URN identifier systems that are used in the context of URNs.
For example, if a non-URN identifier system is used in contexts
other than URNs, it might make use of characters that are
reserved in the URN syntax. This section ought to note any such
characters and outline necessary mappings to conform to URN
syntax. Normally, this will be handled by percent-encoding the
character as specified in Section 2.1 of the URI specification
[RFC3986] and as discussed in Section 1.2.2 of this
5. Any special considerations for the meaning of q-components (e.g.,
keywords) or f-components (e.g., predefined terms) in the context
of this URN namespace.
The "Assignment" section of the template describes matters such as:
1. Mechanisms or authorities for assigning URNs to resources. It
ought to make clear whether assignment is completely open (e.g.,
following a particular procedure such as first-come, first-served
(FCFS)), completely closed (e.g., for a private organization), or
limited in various ways (e.g., delegated to authorities
recognized by a particular organization); if limited, it ought to
explain how to become an assigner of names or how to request
assignment of names from existing assignment authorities.
2. Methods for ensuring that URNs within the URN namespace are
unique. For example, names might be assigned sequentially or in
accordance with some well-defined process by a single authority,
assignment might be partitioned among delegated authorities that
are individually responsible for respecting uniqueness rules, or
URNs might be created independently following an algorithm that
itself guarantees uniqueness.
6.4.4. Security and Privacy
The "Security and Privacy" section of the template describes any
potential issues related to security and privacy with regard to
assignment, use, and resolution of names within the URN namespace.
Examples of such issues include:
o The consequences of producing false negatives and false positives
during comparison for URN-equivalence (see Section 3.1 of this
specification and "Issues in Identifier Comparison for Security
o Leakage of private information when names are communicated on the
o The potential for directory harvesting.
o Various issues discussed in the guidelines for security
considerations in RFCs [RFC3552] and the privacy considerations
for Internet protocols [RFC6973]. In particular, note the privacy
considerations text for the Global System for Mobile
Communications Association (GSMA) / International Mobile station
Equipment Identity (IMEI) namespace [RFC7254], which may provide a
useful model for such cases.
The "Interoperability" section MUST specify any known potential
issues related to interoperability. Examples include possible
confusion with other URN namespaces, non-URN identifier systems, or
URI schemes because of syntax (e.g., percent-encoding of certain
characters) or scope (e.g., overlapping areas of interest). If at
all possible, concerns that arise during the registration of a URN
namespace (e.g., due to the syntax or scope of a non-URN identifier
system) should be resolved as part of or in parallel to the
The "Resolution" section MUST specify whether resolution mechanisms
are intended or anticipated for URNs assigned within the URN
If resolution is intended, then this section SHOULD specify whether
the organization that assigns URNs within the URN namespace intends
to operate or recommend any resolution services for URNs within that
URN namespace. In addition, if the assigning organization intends to
implement registration for publicly advertised resolution services
(for example, using a system developed in the spirit of the original
architectural principles and service descriptions for URN resolution
[RFC2276] [RFC2483]), then this section SHOULD list or reference the
requirements for being publicly advertised by the assigning
organization. In addition, this section SHOULD describe any special
considerations for the handling of r-components in the context of
this URN namespace.
6.4.7. Additional Information
The "Additional Information" section includes information that would
be useful to those trying to understand this registration or its
relationship to other registrations, such as comparisons to existing
URN namespaces that might seem to overlap.
This section of the template is optional.