The difference between the two

Updated June 13, 2017

Most of the time people like to think of URLs and URIs as being the same thing. They are not. There is an important distinction that needs to be explained.

What is a URI?

A URI, which stands for Uniform Resource Indicator is a string of characters written in a particular syntax that identifies a resource. A URI can represent an email address, a file, a set of information, an internet host. What can be received from a resource by way of URI is a representation of that resource. For instance: If a URI points towards a text document, it could be returned with different character encoding, so you can say that the representation of that resource is returned in a particular way. There are formats and protocols to consider here, but that is not the topic. I think we have a pretty good understanding of what a URI is now.

What is a URL?

A URL is a URI, if you hadn't guessed that. However, a URI is not necessarily a URL. A URL points to a particular location of a resource on a particular server. A URI doesn't necessarily need to do that. So, if a URI tells you the name of something and what it is, a URL tells you specifically where to get it. The thing is, a URI is pretty useless unless you know HOW to get it.

This would be why the world has learned the term URL and not URI. Its honestly a vague distinction, but think about this: 'someone@somewhere.com' is an email address, which we know is a URI. You know how to communicate with this resource, but you can't say for sure where the resource is based on the email address. Whereas a URL : "localhost/public/files/tps_report.docx" clearly indicates where a resource is.