Difference between URL, URI, And URN

                  While studying computers and the internet we often listen about URLs, URIs, and, URNs. We also face these types of questions mostly when we go for some job interviews or some type of class presentation. Because these are the basic questions about the internet that are very common and easy to use.

                 So, in this tutorial, I try my best to define the difference between URLs, URIs, and, URNs.
As a basic knowledge URL stands for Uniform Resource Locator, URI stands for Uniform Resource
Identifier, URN stands for Uniform Resource Name.
So, let go in some deep about these concepts. URL is the address of our website. It includes the protocol. It took us to where our information located. On the other hand, the URL is maybe the address or name of our brand. It may include the protocol and maybe not. And URN is only the name and it does not include any address or protocol.


              In short, A URL and URN are also called the URI because both the URL and URN are the subsets of URI. But a URL is maybe URL or URN.
URI (Uniform Resource Identifier) is the Superset of both these terms. Let’s study in detail about these three terms.

URL (Uniform Resource Locater):

              A URL stands for Uniform Resource Locater. It is the address of any resource or information on the internet. Through URL we can directly access the right information or documents. It includes protocols like HTTP or HTTPS. It can also be used for File Transfer FTP or sending emails and many more. URI is a general term while URL is a specific term that locates us to desire location.

Format Of URL:

Protocol:
               It includes some protocol at start like HTTP (Hypertext Transfer Protocol), HTTPS , FTP etc.
WWW:
              Then includes WWW stands for World Wide Web.
Domain Name:
              Then comes domain or your website’s brand name to the address.
Folder Name:
             After that, there should be a folder name or some category of your post or page.
Page:
             At the last, there should be file names like Index.html or index.php.

Examples OF URL:

 https://www.qodiq.com/
               In this example, https is the protocol, after www It is the domain name of or website qodiq.com. It locates us on the main page of the site. If we open some post or page then after that URL, the folder name and page name must come. Some other examples are:

https://www.google.com/
https://www.youtube.com/

URI (Uniform Resource Identifier):

              URI is the general term that stands for Uniform Resource Identifier. It is maybe the address of our website or any other information or maybe showing only our identification or both. It may include protocol or maybe not. It is the superset of both URLs and URIs. While URLs are used to identify only static pages of HTML. But URIs are used to locate semantic web pages also of HTML, XML, JSON, or other formats.

Format Of URI:

Scheme:
                The scheme component is some protocol that comes first in the URI. It may include any other combination of letters or digits. It ends with a semicolon: Scheme name should be registered by IANA. Examples are HTTP, HTTPS, XML, mailto, etc.
Authority:
              The second part is the authority name. It is some kind of identification. It may include our brand name, Username, Password, or IP address, etc.
Path:
             A path contains many parts of the address. It is separated by a slash.
Query Or Fragment:
             It is the optional part of the URI. It includes the queries or location to some secondary source of URI.

Examples OF URI:

  • www.qodiq.com
  • what-is-url.html
  • ldap://[2001:db8::7]/c=GB?objectClass?one
  • mailto:[email protected]
  • tel:+1-674-786-6568
  • telnet://118.0.7.2.06:80/
               These are the examples of URI. In the first example there is no protocol and in the second example no domain name is mentioned. Rest of examples includes protocols.
    So, the index of URI may vary from example to example because it is the general term used to locate any file or any protocol unclearly.

URN (Uniform Resource Name):

              URN stands for Uniform Resource Name.
It is also the subset of URI(uniform resource identifier) because it includes only the name or identification of the brand or website. It does not include protocols like HTTP, HTTPS, XML, etc. It only includes the name and does not locate us to some specific page or to anywhere.

Features Of URL:

  • It is the subset of URI
  • It locates us in a specific place.
  • Every page or document has a different URL.
  • URLs have protocols like HTTP or HTTPS.
  • It locates only HTML pages or static web pages.

Features Of URI:

  • It is the general term.
  • It may include protocol or may not.
  • It includes path, category, authority, query, and fragments.
  • It is used not only static web pages. But, also the semantic web pages including XML, JSON, and other formats.
  • Every URI is may be a URL or a URN but not both.
  • But every URN and URL are also a URI because it is a basic term.

Features Of URN:

  • URN is also the child of the parent category of URI.
  • It does not include protocols.
  • It Specifies only the name of the resource.
0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] language nowadays. The reason is that like HTML and CSS, JavaScript has almost occupied the web and internet. It is the programming language that is used for both front end programming and backend programming […]

1
0
Would love your thoughts, please comment.x
()
x