Key Difference – URI vs URL
The two terms Uniform Resource Identifier (URI) and Uniform Resource Locator (URL) are sometimes used interchangeably. The difference between URI and URL may be a bit confusing, but the following section will guide you through both the above topics and try to increase your understanding regarding the difference between URI and URL. The key difference between URI and URL is that URL is a specialization of URI.
What is URL
URL or Uniform Resource Locator is commonly known as a web address. It is mainly used as a reference to a web resource that lies on a computer network. It also stands as a mechanism for retrieving such a resource. A URL can be specified as a specific Uniform Resource Locator. Although many people use the two terms URI and URL interchangeably, they are different. URLs are mostly used to access web pages, transfer files, email content, databases and is used in many other applications. A web browser displays a URL of a web page on the address bar that is located on the top.
A URL comes with the following components
- Protocol (eg http)
- Host name (eg abc.com)
- File name (eg index.html)
What is URI
URI or Uniform Resource Identifier is referred to as a string of characters that are being used to identify a resource. This feature is useful for identifying and interacting with resource over a network. This is achieved with the use of certain protocols. URI comes with a syntax and an associated protocol. A web address or a URL (Uniform Resource Locator) is the most common form of a URI. URN or Uniform Resource Name is rarely used and comes with a design to complement URL to identify resources. The URN can be compared with a name of a person whereas the URL can be compared with a street address.
The URI uses locations, names or both to identify resources. A URI is often used to identify a location of a resource. The confusion over URI is due to the fact that it uses both name and location to identify resources. Two specializations of URI are URL and URN.
A URI defines a resource by name but does not define how it can be obtained. A syntax is usually used in Schema documents to define a URN. This is used to define a namespace. E.g.: targetNamespace=”urn:abc”
URL is a special URI mainly used to locate specific network resources. The difference between the URN is that a URL defines how a certain resource can be obtained. URL are used every day in the form of http, ftp and smb.
What is the difference between URI and URL?
URI: URI is an identifier.
URL: URL provides information on how to obtain a resource.
URI: A URL is a URI.
URL: URL is a specialization of URI.
URI: A URI describes both the name and the location.
URL: URL cannot be used to describe applications.Image Courtesy: “Internet 1” By Rock1997 – Own work (GFDL) via Commons Wikimedia “URI Euler Diagram no lone URIs” By David Torres original author derivative work: Qwerty0 (talk) – URI_VENN_DIAGRAM.SVG, (CC BY-SA 3.0) via Commons Wikimedia