Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

url
uri

URI vs URL

Educative Answers Team

URI

A Uniform Resource Identifier (URI) is a sequence of characters that identify a physical or abstract resource. A URI can be a location, a name or, even both. In simpler terms, it’s an identifier.

URL

On the other hand, a Uniform Resource Locator (URL), contains information about how to fetch a resource from its location. A URL includes the resource’s location, as well as the protocol used to retrieve it.

svg viewer
URLs are a subset of URIs

A URI can be a name or locator, or both, for an online resource while ​a URL is just the locator. All URLs are URIs, but not all URIs are URLs.


Examples

A telephone number, such as +1-234-567-8912, is a URI since it acts as an identifier for a particular person. The telephone number does not give us the location of the person or how to get to them; therefore, it is not a URL.

However, ftp://example.com/file.zip is a URL since it refers to a particular resource and has the location and protocol to fetch it. This URL is also a URI as it identifies the resource.

RELATED TAGS

url
uri
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring