40

Possible Duplicate:
What's the difference between a URI and a URL?

Just to get it right:

URI = Tells you in which hotel you should go to sleep.

URL = Tells you in which room in what hotel you should go to sleep.

So URL is a lot more specific, it points to a final destination. The thing you want. While URI is something strange.

So what exactly is URI when it's not an URL? What's the real difference?

Community
  • 1
  • 1
Proud Member
  • 39,470
  • 44
  • 145
  • 229
  • 1
    Possible duplicate of [Difference between URI and URL](http://stackoverflow.com/questions/1984213/difference-between-uri-and-url), [What's the difference between a URI and a URL?](http://stackoverflow.com/questions/176264/whats-the-difference-between-a-uri-and-a-url) – Bertrand Marron Nov 21 '10 at 19:46
  • Hi! I've just created a video about this theme. Hope it helps to clarify: https://www.youtube.com/watch?v=RftwVvDKUAw&t=51s – Johnny Svarog Dec 03 '17 at 17:11

3 Answers3

38

URI: Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network (typically the World Wide Web) using specific protocols

URL: In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

Example

To identify a specific resource and how to access it - in all completeness

URI: mysql://localhost@databasename:password

The URL shows you where you can find the database on the internet and which protocol you should use.

URL: mysql://localhost
Ariejan
  • 10,571
  • 6
  • 40
  • 40
15

"URI stands for Universal Resource Identifier and URL stands for Universal Resource Locator. Often times people use the terms interchangably, which is not entirely correct. A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:). Therefore all URLs are URIs. The term URL is deprecated and the more correct term URI is used in technical documentation. All URIs are means to access a resource on the Internet and are a a technical short hand used to link to the resource. URIs always designate a method to access the resource and designate the specific resource to be accessed."- Source

David
  • 422
  • 3
  • 8
3

It's a URN, which identifies an item without giving any location.

Ignacio Vazquez-Abrams
  • 740,318
  • 145
  • 1,296
  • 1,325