Difference between URI and URL#
1. Actual Meaning#
• URI (Uniform Resource Identifier) and URL (Uniform Resource Locator) are two different concepts used to identify resources on the internet:
• URI (Uniform Resource Identifier):
2. Differences Between the Two#
• URI is a broader concept that refers to a uniform resource identifier used to uniquely identify resources on the internet.
• URI can include both URL and URN (Uniform Resource Name) forms.
• URI can be used not only to locate resources but also to provide information about the name of the resource.
• A URI may contain a URL or may not, depending on whether it provides enough information to locate the resource.
• URL (Uniform Resource Locator):
• URL is a type of URI specifically used to locate resources on the internet.
• URL provides the specific path and method to access the resource, such as the protocol (like http, https, ftp), server address, port number, path, etc.
• In short, URL is a subset of URI that allows you to find and access resources over the network.
3. Examples#
• http://www.example.com/index.html
is a URL because it provides the specific path and method to access a particular webpage.
• urn:isbn:978-3-16-148410-0
is a URN, which provides an identifier for a book but does not include information on how to access that resource.
• mailto:[email protected]
is a URI that identifies an email address but is not a URL used to locate a resource.
4. Summary#
In general, a URL is a type of URI specifically used for locating resources, while URI is a broader term that includes URLs and other types of resource identifiers.