URL (Uniform Resource Locator) is primarily used to link a web page, a component of a web page or a program on a web page with the help of the accessing method (protocols such as http, ftp, mailto) for retrieving the location of the resource.
In contrast, URI (Uniform Resource Identifier) is used to define an item’s identity here the word identifier means to distinguish one resource from other regardless of the method used (URL or URN).
A URL is a URI, but a URI can never be a URL. URL specifies, what type of protocol is to be used whereas URI doesn’t involve the protocol specification.
URIs identify and URLs locate; however, locators are also identifiers, so every URL is also a URI, but there are URIs which are not URLs.
• URI – Uniform Resource Identifier
Uniform Resource Identifier Identifies a complete address of resource i-e location, name or both.
• URL: Domain Name Server
Uniform Resource Locator Identifies location of the resource.
• URN: Hypertext Transfer Protocol
Uniform Resource Name Identifies the name of the resource
We have address https://www.topperskills.com/folder/page.html where,
URI(Uniform Resource Identifier) => https://www. topperskills.com/folder/page.html
URL(Uniform Resource Locator) => https://www. topperskills.com/
URN(Uniform Resource Name) => /folder/page.html
URI => (URL + URN) or URL only or URN only
Topper Skills :: This is like the URI
101, Avnish Regency, Narhe, Pune. :: This is like URL, it locates the Topper Skills but indirectly identifies Topper Skills too.