urluriurn

Are all URLs also URNs?


URLs and URNs are subsets of URIs.

There are many answers on Stack Overflow that explain the concepts quite nicely. You often find a Venn diagram where URNs and URLs are overlapping sets, implying that each of the three areas are not empty. I can imagine a URN that's not a URL: the ISBN of a book. I can also imagine a URN that's also a URL: a normal web address.

What would be examples of URLs that are not URNs?


Solution

  • According to the classical view, a URI can either be a URL or a URN (or possibly something else), not both:

    During the early years of discussion of web identifiers (early to mid 90s), people assumed that an identifer type would be cast into one of two (or possibly more) classes. An identifier might specify the location of a resource (a URL) or its name (a URN) independent of location. Thus a URI was either a URL or a URN.

    So in that view, any URI that specifies the resource’s location would be a URL, and never be a URN in addition.

    (According to the contemporary view, this distinction isn’t considered to be useful. It’s recommended to use the term URI or URL for all cases.)