Difference between a URI and a URL?

According to RFC 3986:

 A URI can be further classified as a locator, a name, or both. The term “Uniform Resource Locator” (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network “location”). The term “Uniform Resource Name” (URN) has been used historically to refer to both URIs under the “urn” scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

In Simple Words…

URIs identify and URLs locate; however, locations are also identifications, so every URL is also a URI, but there are URIs which are not URLs.

Consider a specific edition of Shakespeare’s play Romeo and Juliet, of which you have a digital copy on your home network.

You could identify the text as urn: ISBN: 0-486-27557-4.
That would be a URI, but more specifically a URN because it names the text.

You could also identify the text as file://hostname/sharename/RomeoAndJuliet.pdf.
That would also be a URI, but more specifically a URL because it locates the text.

Another Example

  • Bruce Wayne

This is my name, which is identification. It is like a URI, but cannot be a URL, as it tells you nothing about his location or how to contact him. In this case it also happens to identify at least 5 other people in the USA alone.

  • 4914 Wayne Manor, Gotham City, USA

This is a location, which is identification for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as “resident of…”.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s