What is the Difference Between URL and URI

What is the Difference Between URL and URI?

You might have encountered the acronyms URL & URI as you scroll through different websites. Both the concepts are used interchangeably but are not precisely the same. If you want to get a clear idea about the concepts you are on the right page. The write-up will help you learn everything about Uniform Resource Locator (URL) and Uniform Resource Identifier.

Stick through the article to get a thorough understanding of how the common terms differ from each other.

URL – Uniform Resource Locator

In simple words the basic function of a URL is to find out the location of resource present on the web. Basically, it is a pathway to the resource or reference to ultimately reach the resource. The Uniform Resource Locator is unique for every resource and it can either be HTML page, an image, or even CSS document.

The protocol used by URL to access any resource can be

  • HTTP
  • FTP, etc.

The common term for URL can be address of website present on the address bar of your web browser.

Syntax of the URL:

Syntax of the URL

Below is the explanation of the above components of the Syntax of any URL.

  • Scheme: The first component scheme is a representation of protocol that is required by the browser in order to request a specific resource. Common protocols are HTTP and HTTPS.
  • Authority: The two components of authority are the domain name & port of the resource. These two are separated with the help of the colon. A domain name can be the registered name such as firsmexplorer.com whereas the port is gateway to access resource on the server of web. Port number for HTTP is 80 and for HTTPS is 443.
  • Path: It depicts the complete path of the resource.
  • Query: Contains the pair of name and value.
  • Fragment: Optional component that has # symbol prior to it. An identifier is present in the fragment that guides through the directions to reach the secondary resource.

Also Read: Difference Between Artificial Intelligence and Machine Learning? AI vs ML

URI – Uniform Resource Identifier

Uniform Resource Identifier is an identifier for string to refer to the particular resource present on the internet. It uses location, name, or even both to identify a resource. There are two subsets of URI one is URL and another is URN i.e Uniform Resource Number.

The contents of URI are

  • Scheme
  • Authority
  • Path
  • Query
  • Fragment

Some of the common schemes for URI are HTTP, FTP, HTTPS, Telnet, etc.

Syntax of the URI:

Syntax of the URI

  • Scheme: It can be a combination of digits, letters, plus or hyphen signs followed by the sign of colon. The schemes can be only used if they are registered with Internet Numbers Authority (IANA).
  • Authority: Two slashes preceded the authority in the syntax of URI. The three sub parts of authority are userinfo, host and Port.

userinfo- contains the username and the password which is separated by the colon.

host- registered name or the IP address of the resource. The IP address must be enclosed within square brackets []

Port- Optional

  • Path: This depicts the sequence of path which are separated with the help of a slash symbol.
  • Query: Optional component that is preceded by symbol of question mark (?). The query contains string of all the non-hierarchical data.
  • Fragment: Another optional component that is preceded by the symbol of hash (#). It has fragment identifier that can provide directions to secondary resources.

Difference Between URL and URI



The acronym URL stands for Uniform Resource Locator. The acronym URI stands for Uniform Resource Identifier.
It is a subset of URI and can tell just the location or resource. The two subsets of URI are URN and URL. They tell name and location of the resource respectively.
All the URLs can be categorized as URIs. As all the URLs contain location of the resource Not all URIS can be categorized as URLs. Since they can either display the name or the location of the resource.
The aim of URL is to identify location or specific address of resource present on the web. Its aim is to differentiate one resource from another using the name or location.
Example: https://www.firmsexplorer.com Example: ISBN 0-480-35557-4
The common use of a URL is to find a particular webpage on the vast internet. It is used in tag library or XML to find the binaries & specific resources.
Usually, the schema of a URL is HTTP, FTP, or HTTPS. Whereas the schema for URI can be anything. Sometimes the designation, protocol, or any specification.
IT can provide the detail of the type of the protocol that can be used. It does not contain any specifications of the protocol.

Closing Lines URL Vs URI:

Hopefully, the above article gave you an overview of what is the difference between URL and URI. To summarize or to explain it in one line it can be understood as URI of any resource can represent URL & URN. Whereas, in the case of URL it only specifies address of your resource present on Internet.

If you have any queries please drop them in the section of comments. Also, our doors are open for suggestions and feedback through the comment box. If you found the blog helpful, sign up to our blog to get all the latest tech updates directly in your mailbox.

By Support

Our aim is to chase the future, innovations, and the latest trends of all things tech

Write Comment
Deprecated: File Theme without comments.php is deprecated since version 3.0.0 with no alternative available. Please include a comments.php template in your theme. in /home/firmsexplorer/public_html/wp-includes/functions.php on line 5613

Leave a Reply

Your email address will not be published. Required fields are marked *