URL (Uniform Resource Locator):
URL (Uniform Resource Locator) is often defined as a string of characters that is directed to an address. It is a very commonly used way to locate resources on the web. It provides a way to retrieve the presentation of the physical location by describing its network location or primary access mechanism.
The protocol is described within the URL which is employed to retrieve the resource and resource name. The URL contains http/https at the start if the resource may be a web type resource. Similarly, it begins with ftp if the resource may be a file and mailto if the resource is an email address. The syntax of an URL is shown below where the primary part is employed for protocol and the remainder of the part is employed for the resource which consists of a website name or program name.
https://www.geeksforgeeks.org/minimum-cost-graph
Here, the domain name describes the server (web service) and program name (path to the directory and file on the server).
URI (Uniform Resource Identifier):
Similar to URL, URI (Uniform Resource Identifier) is also a string of characters that identifies a resource on the web either by using location, name or both. It allows uniform identification of the resources. A URI is additionally grouped as a locator, a name or both which suggests it can describe a URL, URN or both. The term identifier within the URI refers to the prominence of the resources, despite the technique used.
The former category in URI is URL, during which a protocol is employed to specify the accessing method of the resource and resource name is additionally laid out in the URL. A URL may be a non-persistent sort of the URI. A URN is required to exist globally unique and features a global scope.

Difference between URL and URI:
| URL | URI |
|---|---|
| URL is used to describe the identity of an item. | URI provides a technique for defining the identity of an item. |
| URL links a web page, a component of a web page or a program on a web page with the help of accessing methods like protocols. | URI is used to distinguish one resource from other regardless of the method used. |
| URL provides the details about what type of protocol is to be used. | URI doesn’t contains the protocol specification. |
| URL is a type of URI. | URI is the superset of URL. |
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
Recommended Posts:
- Difference between DAS and NAS
- Difference between PNG and GIF
- Difference between Blu-ray and HD DVD
- Difference between IBM DB2 and MS SQL
- Difference between C and C++
- Difference between ANN, CNN and RNN
- Difference between IoE and IoT
- Difference between AIX and IBM i
- Difference between CD and DVD
- Difference between DFD and ERD
- Difference between OOP and POP
- Difference Between SEO and SEM
- Difference between DDR 5 and DDR 3
- Difference between PIP and HLP
- Difference between BFS and DFS
- Difference between HLP and PCP
- Difference between PCI and PCI-X
- Difference between PCI-E and PCI-X
- Difference between LED and LCD
- Difference between MAN and WAN
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

