What is the difference between a URI and a URL?
Anybody who has browsed the Web knows that a URL is the web address of a web page on a web site. Meanwhile, the Semantic Web is based on the URI. So, what is a URI, and how are they different? The short answer is that all URLs are by definition URIs and in the context of the Semantic Web the preferred term is URI.
Part of the answer is historic: URL (Uniform Resource Locator) is the original term for a web address, the location of a web resource or web page on a web site, but technically we should be using the newer term URI (Uniform Resource Identifier.)
Going further back in history, at one stage URI meant Universal Resource Identifier, but that usage has been superceded by Uniform Resource Identifier.
There is a little bit more to it. While all URLs are in fact URIs, a subset of URIs are not URLs, in particular, the subset known as URNs or Uniform Resource Names. An example of a URN might the ISBN number for a book such as "URN:ISBN:0-062-51587-X".
- A URI is either a URL or a URN.
- Every URL is a URI.
- Every URN is a URI.
- A URN is never a URL.
- A URL is never a URN.
For HTML Web pages, it still makes since to refer to the URL of a web page, even though URI is now the technically more precise term, since an HTML Web page URI is in fact always a URL (and vice versa).
For RDF statements, the subject, predicate, and objects of an RDF triple are by definition referred to as URIs. They may at times in fact be URLs and refer to resources which are files on Web servers, but that is not required in all cases.
If you really want to get technical, there is a discussion in IETF RFC 3305 entitled "Report from the Joint W3C/IETF URI Planning Interest Group: Uniform Resource Identifiers (URIs), URLs, and Uniform Resource Names (URNs): Clarifications and Recommendations".