Thursday, 21 April 2011

The differences between URL, URI and URN

The W3C's specs are great, and I love them, but they can be overkill, so I'm reluctantly resorting to quoting Wikipedia:
A Uniform Resource Identifier is a string of characters used to identify a name or a resource on the Internet... One can classify URIs as locators (URLs), or as names (URNs), or as both.

Simply put, a URI is a string of characters that identifies a resource on the Internet, either by location, a name, or by both.

A Uniform Resource Name (URN) functions like a person's name, while a Uniform Resource Locator (URL) resembles that person's street address. In other words: the URN defines an item's identity, while the URL provides a method for finding it.

Here are 2 examples of URNS:

The URN for "The Last Unicorn", identified by its book number.
Default Namespace Rules for MPEG-7 video metadata.

A Uniform Resource Locator is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

In other words, a URL includes an access mechanism, or network location, such as http:// or ftp://. Examples:

  • telnet://
  • ftp://springboardseo/robots.txt

Note that is not a URL; it's a URI, as this address might respond to different protocols, such and with or



When describing web addresses, the proper term to use is URI; it will always be technically correct, whichever web address you're referring to. In fact it's possible that URL is near deprecation. That being said, you may be labelled pretentious in less geeky circles for nitpicking, so unless you enjoy questioning grimaces of the less informed, keep URL in your vocabulary.