As we have experienced in our online presence, In many places universal resources identifier URI and universal resources locater URL are interchangeable. But we found later, that they have many differences too. It will add value to your website ranking if you understand the difference briefly. We can say the main difference between them, is URI is the name and location, or both. On the other hand, URL is the only resource location finder.

Furthermore, in this blog, I will try my best to explain the differences between them more precisely. Along with their main function and structure as well. Here I will also elaborate on their pros and cons correctly.

Differences Between URI and URL

Here is given a comparison table that clearly defines what differences exist between them.

URI is an acronym for a Uniform Resource Identifier.URL is an acronym for a Uniform Resource Locator.
URI is the superset of a URN and a URL.URL is the subset of URI.
URI identifies a resource and differentiates it from others by using a name, location, or both.URL identifies the web address or location of a unique resource.
URI contains components like a scheme, authority, path, and query.URL has similar components to a URI, but its authority consists of a domain name and port.
An example of a URI is ISBN 0-476-35557-4.An example of a URL would be
URI is usually used in XML, tag library files, and other files, such as JSTL and XSTL.URL is mainly for searching web pages on the internet.
URI scheme can be a protocol, a specification, or a designation like HTTP, file, or data.URL scheme is a protocol, such as HTTP and HTTPS.


After finding out the main differences between the two here we further discuss the types of URI.


While acting as a persistently, independent location identifier, It has aimed to identify resources permanently. It means where ever you go its resource remain valid even though the location is being changed.

URNs mainly consist of three components

  • URN – Every URN uses the prefix specification.
  • NID – This refers to the name space identifier that is being registered to the internet assigned number authority(IANA) based on letter hyphens and digits and followed by actions.
  • NSS – This is a name space-specific string that mainly functions for identifying resources it contains ASCII codes based on digits, numbers, punctuation, and special characters.

Uniform Resource locaters

A URL specifies the method to obtain a representation of the physical location through the description of the primary access mechanism or its network location. The resources it tries to locate can be a web page, a video, an image, or any document published online.

Unlike a URN, this internet resource identifier is not always persistent and location-independent since it specifies the path to the resource, which may change over time. Also, a URL does not follow the URN scheme.

The main difference between both identifiers is that a URN specifies only a resource’s name, while a URL needs the accessing technique or protocols to retrieve the resource’s location.


Here uniform resource identifier (URI) syntax helps in understanding its structure. Allow the programmer to understand it. Here we find the generic syntax structure of uniform resources identifier;

Scheme: [//authority]path[?query] [#fragment]

Here we further discuss the elements of URI syntax


A scheme is considered one of the main elements that are not only defining the address system but also in some cases acts as a protocol for accessing resources. I am here trying to figure out the difference; the Scheme is merely used in web browsers whereas the resource is built –in the clients and does not have any association with a specific protocol. The scheme is the combination of digits, letters, signs, periods, hyphens, and colons. The most commonly used URI scheme are including HTTP, FTP, HTTPS mailto, and file can be better understood by the following example;

If the URI is the scheme name is file.

Authority Components

This is as being optional component proceeds by double slash and is being terminated by slash and a question mark or it may be hash, it further divided into three sub- components.

  • User info: this is consisting of a user name and a password being separated by a colon.
  • Host: it consists of either an IP address or a registered name. The IP address must be inserted in brackets.
  • Port: This is serving as a protocol in connecting with services, As is optional sub-component is followed by a colon.

For example, the authority components are shown below. File: is


The path contains a sequence of data segments that describes the location of a resource in a directory structure. It should be empty or separated by a slash. For example, telnet:// or foo:// Fred is a valid URI with an empty path since there’s no indication of the specific resource location.

Query Components

This is also an optional component leading toward non-hierarchical is a string of key=value pairs this is sustaining question mark. For example; if the URL is Search=test-question#part2 In it query component is search=test-question.

Fragment component

This has been loaded with a fragment identifier directed toward the secondary resource. It acts as a bridge in connecting to primary resource it proceeds by hash symbol and is being terminated by URL end. The example is given below; Search=test-question#pat2

URL Syntax System


Each URL should be following URI syntax that is quite in resemblance with URI. An example of the URL syntax is given below; The above-mentioned URL is further divided into segments.


The URL syntax is working as a protocol being used in retrieving resources. The function of the URL scheme is to provide an application that your device uses to open a URL. The most commonly used protocols for URL schemes are;

  • Hypertext transfer protocol (HTTP) allows users in accessing data from web pages via using hyperlinks.
  • Hypertext transfer protocol secure (HTTPS) works as a guard in transmitting data between user browser and site.
  • File transfer protocol. (FTP) this is used for transferring files from different devices via networks.

In addition to that, there are some protocols being used as mailto links in identifying email addresses. The main purpose is to specify database access which is based on the user’s requirement.


As for as authority is concerned this is separated by a double slash. This is divided into further two components. One is the domain name and the other is the port connecting to the resource you are in access to. As we already know the domain is a registered name of the resource. As etc.

As for port is concerned it is specifying which web service you have been requesting on a web server. For example, the web port number for HTTP URL is 90 and HTTPS URL is 588, in this case however if the web server is using a standard protocol like HTTP or HTTPS  the port will definitely omit from the URL.


This is usually found influential in specifying the location of a web page or it may be other files that users want to access within a particular domain name. A path may also consist of asset file extension which can be images or documents. However, it has also been seen all URLs is not containing path components. Revolution in technology has changed the preexisting way and shortened the URLs.An example of it is given below; …/software/htp/index.html or …/forum/question/.

Query String

Usually, the query string is functioning in delivering data about the resource on the web server and is being preceded by a question actually consists of key and value pairs that are being separated by an ampersand, the example is given below;

?tag=networking& or der=newest.

The data stored on the query string is stateless. It means each in-process request acts like an independent one and does not have any co-relation with the previous. As a result, the connection between the browser and web server will automatically be closed once it has been ended.

Additionally, the strings are also used as URL query parameters which are having some purpose. It helps users in browsing content from a resource.


For better understanding, it is essential to know the differences between URLs and URI. A URL stands for uniform resource locater and URI is the depiction of a universal resource identifier of name location or both. As we already know the URI further has different types of files and resources.

As for as the URL is concerned, it acts as a string of characters that is showing the resource address and method which we can access on the web page. A URL is a part of URI. They are following the same structure. I hope this blog will help you in understanding the difference between them.

For Any suggestions write them down in a comment section or visit the contact us page.