The provisions for URL and URI are defined by W3C. The World Wide Web Consortium (W3C) is having the situation of international standards organization for the “World Wide Web”.
It was headed and founded by Mr Sir Tim Berners-Lee.Most of the developers having a misunderstanding with these two URI and URLs. This is because they are related.
You may see, a URI can be a locator, name or both for an online resource where a URL working just as the locator. URL is the subset of URI. It means all URLs are the URIs. But it doesn’t work oppositely.
What is URI
URI stands for “Uniform Resource Identifier”. URI is the text which is defined to identify any name or resource available on the Internet.
URI has two specialities URN (Uniform Resource Name) and URL (Uniform Resource Locator) to identify name and resource. It includes an authority, query, URI scheme, path, and fragment by syntax.
For example, Http: is a URI term.
What is URL
URL standards for the Uniform resource locator. URL is the subset of the Uniform Resource Identifier (URI).
The term “Uniform Resource Locator” (URL) refers to the subset of URIs that is in addition to recognizing a resource, provide a means of locating the supply by unfolding its primary access mechanism (e.g., its network “location”).
Every URL has to start with any of these schemes: HTTP, FTP, gopher, https, Mailto, Prospero, news, telnet, NNTP, wais, or file.
Your name or your business name could be a URI because it classifies you, but it could not be a URL because it does not help anyone find your location.
However, your address is both a URL and URI because it both locate you and it provides a location for you.
Both are URI and URLs, are used to identify any name or resource on the internet, but there is some subtle difference between them. URI is the superset of between both URLs and URNs.
The main difference between URI and URL is the protocol to regain the resource. URL always includes a network protocol e.g. HTTPS, HTTP, FTP etc to regain a resource from its location.
Difference Between URI, URL, and URN
Once you know the basic criteria of what is URI and URL. This is an easy way to find the difference between them. The main difference between URL and URI is that every URL is a URI but this is not applicable for vice versa.
Another difference between URL and URI is that the URL includes some protocols, which is key to recovering information from every location. Like, below are some differences between URI, URL in point format:
-Every URL includes protocol e.g. ftp://, http://, along with location to recognize resource e.g. http://www.abc.com.
-Every URN and URL are URI because URI is the superset of both URN and URL.
Differentiation in Usage of the Term URL vs URI
There is just a bit of discussion related to how and when you should correctly use the term URL vs URI. No matter how the URL is organized, it will always be strictly correct if you define the term URI.
This is because, as we understand above, a URI can identify a resource by location (URL), by name (URN).
Therefore, if the resource covers a protocol such as FTP://, HTTP://, and so on, the term URL is frequently used as this is more specific. Secondly, if the source is less specific in terms of comprising a location identifier, then the term URI should be used.
The following are the examples of all considered URLs as both URIs to get complete and clear understanding. Firstly, we must know URNs also fall under the umbrella of URIs.
However, the following list contains a few examples of resources that also can be considered solely a URN or a URL.
mailto:[email protected] (URL is scheme here as due to the Mailto: protocol)
http://www.abc.org/rfc/rfc2396.txt (URL is scheme here as due to the https:// protocol)
The scheme – To know URLs, is the name of the protocol we can use to access the resource.
Authority – Authority is the optional part that comprised a user that authentication the basic information that a host and an optional port.
Path – This serves you to identify the resource within the possibility of its authority and scheme.
Query − Additional information is used along with the path that serves to identify a resource. This is the query string for URLs.
Fragment – Fragment is the optional identifier that is to a specific part of the resource.
Finding from all this information is, A URL is a URI, but a URI can never be a URL. The URI is the best identifier of the resource and locator.