What is a URI?
URI (Uniform Resource Identifier) is a series of characters to identify a resource. It has the following format:
Here the “scheme” is mistaken for protocols. Schemes are not protocols. Many schemes have been designed to work with protocols, yes, bu it is not true for all schemes. Scheme part tells us how the read and interpret the rest of the identifier string.
The example above has the scheme “file”, and there is no “file” protocol as you know. File scheme is typically used to retrieve files from within one’s own computer.
Not all parts of the URI format defined above are mandatory. Below are the optional parts of a URI:
What is a URL?
Uniform Resource Locator is a special type of URI. Which means URLs are actually URIs. A URL points to a resource on the web. While doing that, a URL tells us where the resource is and which mechanism to use to access it (protocol).
What is a URN?
A URN (Uniform Resource Name) is a special type of URI just like a URL. URNs define a unique resource in the context of a namespace, they don’t tell anything about the location or the access mechanism for this resource.
Below are 2 sample URIs from Wikipedia: