Uniform Resource Name (URN) is a type of URL-independent identifier.

A URN provides a persistent, location-independent name for a resource, ensuring it remains identifiable even if the resource's location changes or it becomes unavailable. Unlike URLs, which specify how and where to access a resource (e.g., via HTTP or FTP), URNs focus solely on identification. They are designed to be permanent and stable over time.

  • Syntax: URNs follow the format urn:<namespace>:<unique-string>, such as urn:isbn:9780141439518 (for a book) or urn:doi:10.1000/182 (for a digital object).

  • Use Cases: Ideal for long-term references to resources like books (via ISBN), academic papers (via DOI), software packages (via UUID), or any item requiring a stable identifier.

  • Key Feature: Persistence — a URN does not change, even if the resource moves or is republished.

While URNs are a subset of URIs (Uniform Resource Identifiers), they are specifically designed to be independent of URLs and their location-based access mechanisms.

AI-generated answer. Please verify critical facts.
Top answer
1 of 3
5

Ok, as I just have fixed my SMF OpenID endpoint implementation (read details about some very related problems I had here) where I made a few assumptions on those relations. Of course that doesn't prove them right (so please correct me). Here they are:

  • Identifier URL = OpenID endpoint URL = IdP

  • The OpenID endpoint is not unique. It is the same for all end users of that endpoint.

  • Verified identifier URL = identity

  • Verified identifier URL is unique. It is associated to the endpoint user account.

  • https://www.google.com/accounts/o8/id is the Google OpenID endpoint URL.

  • https://www.google.com/accounts/o8/id?id=AltOawk... is the Google OpenID verified identifier URL.

  • The hash the Google OpenID identity URL contains is also related to the OpenID realm (the consumer domain namespace where this OpenID identifier stays valid). That is one of the reasons to not be just the username.

  • About how to provide the unique verified identifier URL, see here.

Still some things remain unclear to me:

  • What other reasons are there that Google uses for the hashed id; it could have also used id?u={username}&oidrealm={...}.

  • What is the reason to have such OpenID realm at all?

  • What exactly is the difference between identifier URL and claimed identifier URL?

2 of 3
2

Here is my understanding. I am actually just answering the last two questions in your own answer. Hope someone finds these useful.

What is the reason to have such OpenID realm at all?

The realm is used for security. Basically the return_url is checked against the realm, and OpenID specs say they MUST match. Google has taken this one step further, and provides unique verified identifiers for each realm. They might have done as you suggested, and put the realm back in their identifier, but then you could tell by looking at two verified identifiers whether they were the same end-user or not. I think they are trying to keep their identifiers free of identifying information. (ironic, no?)

What exactly is the difference between identifier URL and claimed identifier URL?

The claimed identifier is the one the end-user has specified. This is not their unique identifier. Yahoo is a good example of this. They allow you to specify yahoo.com as your identifier, log into your yahoo account, and return a unique identifier to the openid consumer. This just simplifies the process for the end-user. (And increases the likelihood that they'll use yahoo.com as their openid!)

🌐
HubSpot
blog.hubspot.com › website › uri-vs-url
URI vs. URL: What’s the Difference?
13 February 2023 - There are two types of URIs: URNs and URLs. A uniform resource name (URN) is a persistent and location-independent identifier that follows the “urn” scheme.
🌐
The Trojan
apoorvtyagi.tech › nanoid-url-friendly-unique-id
Introducing a URL friendly unique identifier - NanoID
26 July 2021 - It is a tiny, secure, URL-friendly, unique string ID generator.
🌐
TechTarget
techtarget.com › whatis › definition › URI-Uniform-Resource-Identifier
What is a Uniform Resource Identifier (URI)? | Definition from TechTarget
A URN does not state which protocol should be used to locate and access the resource. Instead, it labels the resource with a persistent, location-independent and unique identifier.
🌐
CodeGenes
codegenes.net › blog › what-is-the-difference-between-a-uri-a-url-and-a-urn
What is the Difference Between URI, URL, and URN? A Clear Technical Explanation — codegenes.net
URNs (Uniform Resource Names): URIs that specify a persistent, location-independent name for a resource. ... All URLs are URIs. All URNs are URIs. But not all URIs are URLs or URNs. A Uniform Resource Locator (URL) is a type of URI that goes beyond mere identification...
🌐
ScienceDirect
sciencedirect.com › topics › computer-science › resource-identifier
Resource Identifier - an overview | ScienceDirect Topics
A URN is assigned independently of a resource's location, and its syntax includes a namespace identifier and a namespace string, such as urn:isbn:1-55860-672-6. Unlike URLs, URNs do not provide a way to locate the resource on the web, but both URLs and URNs are global identifiers.
🌐
W3C
w3.org › Addressing › URL › uri-spec.html
Universal Resource identifiers in WWW
The fragment-id follows the URL of the whole object from which it is separated by a hash sign (#). If the fragment-id is void, the hash sign may be omitted: A void fragment-id with or without the hash sign means that the URL refers to the whole object. While this hook is allowed for identification of fragments, the question of addressing of parts of objects, or of the grouping of objects and relationship between continued and containing objects, is not addressed by this document.
Find elsewhere
🌐
Wikipedia
en.wikipedia.org › wiki › Uniform_Resource_Identifier
Uniform Resource Identifier - Wikipedia
2 weeks ago - A Uniform Resource Identifier (URI), formerly Universal Resource Identifier, is a unique sequence of characters that identifies an abstract or physical resource, such as resources on a webpage, email address, phone number, books, real-world objects such as people and places, and concepts. URIs which provide a means of locating and retrieving information resources on a network (either on the Internet or on another private network, such as a computer file system or an Intranet) are Uniform Resource Locators (URLs).
🌐
TechTarget
techtarget.com › searchnetworking › definition › URL
What is a URL (Uniform Resource Locator)? Definition from SearchNetworking
A URL (Uniform Resource Locator, also called a web address) is a unique identifier used to locate a resource on the internet.
🌐
GoDaddy
godaddy.com › resources › skills › domains › uri vs url vs urn: what’s the difference and why it matters
URI vs URL vs URN: What’s the difference and why it matters - GoDaddy Blog
A URN is a type of URI that identifies a resource by name, not by where it’s located or how to access it. URNs are built to be persistent and location-independent, which makes them ideal for long-term references..
Published   19 August 2025
🌐
Medium
paul-d-chuang.medium.com › uri-v-s-url-v-s-fqdn-54d3d140f49d
URI v.s. URL v.s. FQDN. URI: uniform resource identifier. | by Paul Chuang | Medium
7 August 2024 - URNs serve to provide persistent, localtion-independent resource identifiers. ... 930-2-12-123409-0 is the namespace-specific string, which is the actual ISBN for a specific book. (regardless where the book is located physically or digitally) An FQDN is a complete domain name that specifies its exact location in the hierarchy of the Domain Name System (DNS). It includes all domain levels, including the top-level domain (TLD), and is unique across the internet. ... URL ...
Top answer
1 of 8
4

Generally with web-sites you're trying to make them easy to crawl and get access to all the information so that you can get good search rankings and drive traffic to your site. Good web developers design their HTML with search engines in mind, and often also provide things like RSS feeds and site maps to make it easier to crawl content. So if you're trying to make crawling more difficult by not using sequential identifiers then (a) you aren't making it more difficult, because crawlers work by following links, not by guessing URLs, and (b) you're trying to make something more difficult that you also spend time trying to make easier, which makes no sense.

If you need security then use actual security. Use checks of the principal to authorize or deny access to resources. Obfuscating URLs is no security at all.

So I don't see any problem with using numeric identifiers, or any value in trying to obfuscate them.

2 of 8
3

Using a hash like MD5 or SHA on the ID is not a good idea:

  • there is always the possibility of collisions. That is, two different IDs hash to the same value.
  • How are you going to unhash it back to the actual ID?

A better approach if you're set on avoiding incrementing IDs would be to use a GUID, or just a random value when you create the ID.

That said, if your application security relies on people not guessing an ID, that shows some flaws elsewhere in the system. My advice: stick to the plain and easy auto-incrementing ID and apply some proper access control.

🌐
GoDaddy
godaddy.com › home › posts › uri vs url: the main differences between url & uri
URI vs URL: the main differences between URL & URI - GoDaddy Resources - UAE English
11 October 2024 - A URN is another type of URI that is used to identify a resource by its name. As mentioned above. a URN is a type of URI that identifies a resource by its name rather than its location.
🌐
Google Cloud
cloud.google.com › blog › products › api-management › api-design-choosing-between-names-and-identifiers-in-urls
API design: Choosing between names and identifiers in URLs | Google Cloud Blog
18 November 2018 - Faced with these tradeoffs, which style of URL should you choose? The best response is not to choose: you need both to support a full range of function. Providing both styles of URL gives your API a stable identifier as well as the ease of use of hierarchical names.
🌐
ICANNWiki
icannwiki.org › URL
URL - ICANNWiki
The Absolute URL is a URL that is independent of other elements and points directly to an exact file location.
🌐
Medium
medium.com › @gaspm › nano-id-popular-secure-and-url-friendly-unique-identifiers-1fa86c9fdf7c
Nano ID: Popular, Secure, and URL-Friendly Unique Identifiers | by Michal Gasparik | Medium
12 December 2024 - The truth is, that Nano ID looks much more friendly in URLs when combined with a so-called slug text compared to the UUID.