Difference Between URL and URI

The main difference between URL and URI is that the URL allows identifying a web resource only by its location while the URI allows identifying a web resource using the name or location or both.

URL and URI are two terms that are used interchangeably. But there is a difference between URL and URI. URL is a string of characters that helps to identify a resource on the web using the location. URI is a string of characters that helps to identify a resource on the web either by using the location, name or both of them. In other words, URI specifies the name and the location of the resource on the web. It can describe the URL. Furthermore, the URL is the most common type of URI.

Key Areas Covered

1. What is URL
     – Definition, Functionality
2. What is URI
     – Definition, Functionality
3. Difference Between URL and URI
     – Comparison of Key Differences

Key Terms

URI, URN, URL

Difference Between URL and URI - Comparison Summary

What is URL

URL stands for Uniform Resource Locator. It is a string of characters that defines the address. It is the most common way to identify the location of the resource in the World Wide Web (WWW).

Main Difference - URL vs  URI

Figure 1: URL

Other than the URL, there is another identification string called URN. It stands for Uniform Resource Name. It is a string of characters that defines the name of the resource. As two resources can have the same name using URN is not very effective. Therefore, the URL is commonly used. URL is infact the web address. Most web browsers display the URL of a web page above in the address bar.

An example URL is as follows.

http://www.shoppingworld.com/products/product.php

http defines the protocol while www refers to the World Wide Web. The shoppingworld.com refers to the domain name. It is a set of characters that define the website. The www.shopping world.com section is also referred as the hostname. The products/product.php is the path to the file. The product.php is the exact file name.

What is URI

URI stands for Uniform Resource Identifier. It is a string of characters used to identify a resource on the web either by location or by name or by both.

Difference Between URL and URI

Figure 2: URI

URL and URN are types of URI. Therefore, the URI can describe both URL and URN.  It is a superset of URL and URN. Moreover, it can include authority, scheme fragment, and query.

Difference Between URL and URI

Definition

URI is a string of characters designed for unambiguous identification of resources and extensibility via the URI scheme. URL is a web address that refers to a web resource that specifies its location on a computer network and a mechanism for retrieving it.

Stands for

Uniform Resource Locator is the long form of URL. Uniform Resource Identifier is the long form of URI.

Association

URL is a type of URI. URI is the superset of URL.

Usage

While URL helps to identify a web resource using the location, URI helps to identify a web resource either by name, location or both.

Conclusion

The difference between URL and URI is that the URL allows identifying a web resource only by its location while the URI allows identifying a web resource using the name or location or both. In brief, the URL is a specific type of URI.  The URI that specifies the location of the web resource is called the URL.

Reference:

1. “URL.” Wikipedia, Wikimedia Foundation, 24 Aug. 2018, Available here.
2. “Uniform Resource Identifier.” Wikipedia, Wikimedia Foundation, 22 Aug. 2018, Available here.

Image Courtesy:

1. “Uniform Resource Locator (URL) example”By Meilani.conley – Own work (CC BY-SA 4.0) via Commons Wikimedia
2. “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

About the Author: Lithmee

Lithmee holds a Bachelor of Science degree in Computer Systems Engineering and is reading for her Master’s degree in Computer Science. She is passionate about sharing her knowldge in the areas of programming, data science, and computer systems.

Leave a Reply