URI, URL and URN: What’s the goddamn difference?

URI, URL and URN: What’s the goddamn difference?

I had been seeing the term URI used in place of URL for quite a long time and it finally got to my head to investigate that what the heck is a URI and why is it kicking URL’s bum off the net almost everywhere.

I always thought that a URL is the address of a website and it is entered into the address bar of a browser to visit it. But what does it consist of? I never cared to find out, that is until URI decided to pop up. Recently, I decided to do a little research on the topic during which I came across URN too. Let’s take a look at what I found.

First of all, let’s see what these terms stand for.

URI: Uniform Resource Identifier.

URL: Uniform Resource Locator.

URN: Uniform Resource Name.

What is a URI?

According to Wikipedia:

In computing, a Uniform Resource Identifier (URI) is a compact string of characters used to identify or name a resource on the Internet. The main purpose of this identification is to enable interaction with representations of the resource over a network, typically the World Wide Web, using specific protocols. URIs are defined in schemes defining a specific syntax and associated protocols.

Now what the heck does this mean?

Simply that the Web consists of “resources” of information. Each of these resources has a certain string or combination of characters associated with it that “identifies” it i.e. acts as it’s name or address. This “identification” coupled with a means to access or classify a resource forms a Universal Resource Identifier (URI).

I go by the name SAWJ on this blog. And I have a residential address. Both can act as my URIs.

So where do URL and URN fit in?

URI is divided into two categories: URL and URN.

The URN is simply the “name” of a resource. It also gives details about the criteria through which the name was awarded. Wikipedia gives the following example:

A typical URN is the ISBN system for uniquely identifying books. ISBN 0486275574 (urn:isbn:0-486-27557-4) cites unambiguously a specific edition of Shakespeare’s play “Romeo and Juliet”.

Confused? I was too!

ISBN stands for International Standard Book Number. It is a way of identifying a book through a certain unique number assigned to it through out the world. I won’t go into the details of this as it will deviate from the topic.

Here you can see the URN of Shakespeare’s play “Romeo and Juliet” as urn:isbn:0-486-27557-4. It is evident that the letters isbn: indicate the nature of the number that follows, i.e. it is the unique number that identifies a certain edition of Shakespeare’s aforementioned play globally.

But the URN does not indicate a method to retrieve or access this play. It only tells us that the play has a “name” of 0-486-27557-4 according to the ISBN classification, or “protocol”. So how do we access it?

Enter URL!

Again, according to Wikipedia:

A URL is a URI that, in addition to identifying a resource, provides means of acting upon or obtaining a representation of the resource by describing its primary access mechanism or network “location”.

This means that in addition to providing an identification of the resource, a URL also provides information on how to access it. For example, tech.ratedsawj.com identifies this blog and “http” indicates the protocol/procedure/mechanism that is to be used to access it.

Back to analogies, my URN would be urn:blogger: SAWJ. It simply tells that I have been classified as a “blogger” and my name is SAWJ. No information on how to reach me.

My URL would be my mail address, or cell phone number. Both identify me by a certain unique value (the address of the place I live, or the unique cell phone number I have been given.) In addition to this, they also tell that I can be reached “by mail”, or simply by “making a call at my number”.

Please note that URI, URL and URN are restricted to the Web only. They do not apply to humans, I was only giving an example! ;)

Why URI instead of URL?

Since URN’s are rarely used (or not used at all) as a means of accessing resources on the internet, URLs were left alone as the sole means of doing so. This made them the “de facto” URIs of a resource. This also meant that URLs practically became URIs, but not theoretically. In technical publications, the term URL was replaced by URI, and has since been labelled as “deprecated”. But in the world of WWW software, the term is “ubiquitous” and still very much alive.

SAWJ

SAWJ is a blogger from Pakistan. A PHP Developer by profession, he aspires to be a Software Engineer someday. You can find his personal blog here and follow him on Twitter here. You can also add him on Google Wave at sawjafri [at] googlewave [dot] com.

SAWJ has written 29 articles on Rated:SAWJ!.

One Response to “URI, URL and URN: What’s the goddamn difference?”

  1. book says:

    nice post, thanks for sharing.
    I usually don’t post on Blogs but ya forced me to, great info.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>