Difference between URN and URL

URI(Uniform Resource Identifier)

A URI (Uniform Resource Identifier) is a sequence of characters that identifies a logical or physical resource. Universal Resource Identifiers are specified in the Internet Engineering Task Force (IETF) Request for Comments (RFC) 3986 and are summarized and extended in documentation for the W3C’s Web Architecture, Architecture of the World Wide Web, Volume 1. According to the specifications, resources do not have to be accessible on the Internet. Examples of resources include electronic documents, elevator door sensors, XML namespaces, web pages and ID microchips for pets.




There are two types of URI :

  1. Uniform Resource Name

  2. Uniform Resource Locator


URN (Uniform Resource Name)

(URN) is a string of characters that gives the name of the resource. Like in real life, two objects on the Internet also can have the same name. URN gives a unique identity of a resource within a defined area or namespace. The combination of URL and URN gives the resource a unique identity.


Syntax:

urn:<nid>:<nss></nss><.nid>


URN Components

1. URNs scheme specification

2. namespace identifier

NID. NID should be registered in IANA (The Internet Assigned Numbers Authority). IANA regulates and monitors the domain names, IP addresses, and protocol parameter identifiers that are used by Internet standards. IANA is an administrative function of the Internet.

3. NSS(Namespace specific string) This identifies the specific resource.


URL (Uniform Resource Locator )

URL is a string of characters that refers to the address of the resource on the Internet. URL assists in reaching the location where the object can be found. Basically, they are the web address or location of the files, videos, documents, images, web pages, etc. that have been published and shared on the Internet. URL also provides the approach scheme or protocol to reach the location and retrieve the information.