URL, URI, URN what's the difference?

Filipe Ximenes
May 13, 2015
<p><strong><a href="http://en.wikipedia.org/wiki/Uniform_resource_locator">URL</a></strong>, <strong><a href="http://en.wikipedia.org/wiki/Uniform_resource_identifier">URI</a></strong> and <strong><a href="http://en.wikipedia.org/wiki/Uniform_resource_name">URN</a></strong> are widely used terms when we talk about the web, although they seem to be the same, there is a slight difference between each one of them. Lets take a look at URIs first. According to Wikipedia URIs are:</p><blockquote>"A uniform resource identifier (URI) is a string of characters used to identify a name of a web resource"</blockquote><p>The key to understanding is <code>a string of characters</code>, URIs are a concept of how to identify things on the web.</p><p>There are many ways to identify something, for instance, you can use a name, a location or even a description of the object. In the web it works just the same, you can identify resourses by name or by it's location and we have a name for each method: URN (Uniform Resourse Name) and URL (Uniform Resource Location) respectively.</p><p>So, how does each one work in real world? Lets say I want to refer to the book "Rework", I can do this using the <a href="http://en.wikipedia.org/wiki/International_Standard_Book_Number">ISBN</a> <a href="http://en.wikipedia.org/wiki/URI_scheme">scheme</a> <strong>URN</strong>: <code>isbn: 0307463745</code>, which will identify the exact book I'm taking about or in case I want to tell you about where to buy it, I can point to the HTTP scheme <strong>URL</strong>:</p><p><code>http://www.amazon.com/Rework-Jason-Fried/dp/0307463745</code></p>