Trending October 2023 # Url Vs Uri: Key Difference Between Them # Suggested November 2023 # Top 17 Popular |

Trending October 2023 # Url Vs Uri: Key Difference Between Them # Suggested November 2023 # Top 17 Popular

You are reading the article Url Vs Uri: Key Difference Between Them updated in October 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested November 2023 Url Vs Uri: Key Difference Between Them

In this URL vs URI tutorial, you will learn:

In this URL vs URI tutorial, you will learn:

A URL is a global address of documents and protocols to retrieve resource on a computer network. URLs occur most frequently in reference to web pages (HTTP) but can also be used for database access using JDBC, email (mailto), file transfer (FTP), and many other applications. The full form of URL is Uniform Resource Locator.

A URI is a string containing characters that identify a physical or logical resource. URI follows syntax rules to ensure uniformity. Moreover, it also maintains extensibility via a hierarchical naming scheme. The full form of URI is Uniform Resource Identifier.

As mention in the above figure, there are two types of URI:

Ven Diagram of URIs and URL

Ven diagram of URI and URL

As mention in the above diagram, “your name” can be a URI because it identifies you. It cannot be URL since it does not assist any person to find your home location.

On the other hand, “your home location” can be URI as well as URL. The reason is both identify you and gives a home location for you.

Syntax of URL

Here is a Syntax of URL:

We can divide the above URL into the following parts:

Protocol: It is the first part of the URL. Here, the protocol name is Hypertext Transfer Protocol (HTTP).

/folder-name/: It indicates that the website page referenced in “filed” in a given folder on the webserver.

web-page-file-name.htm: It is actually a web page file name. The “.htm” is an extension for the HTML file, which shows that it is a static web page. File names can have different extensions or it is depend on how you have set up a web server. There could be no extension at all, and the URL could end with a slash line (/).

Example of URL

This example URL has a folder but no extension

This example URL has no folder

This example URL has no extension

Syntax of URI

Here is a syntax of URI:

URI = scheme:[//authority]path[?query][#fragment]

The URI includes the following parts:

Scheme component: It is a non-empty component followed by a colon (:). Scheme contains a sequence of characters starting with a letter and followed by any combination of digits, letters, period (.), hyphen (-), or plus (+).Examples of well-known schemes include HTTP, HTTPS, mailto, file, FTP, etc. URI schemes must be registered with the Internet Assigned Numbers Authority (IANA).

Authority component: It is an optional field and is preceded by

Optional userinfo subcomponent that might consist of a username and password (optional).

A host subcomponent containing either an IP address or a registered name.

An optional port subcomponent that is followed by a colon (:)

Path: A path contains a sequence of segments that are separated by a slash.

Query component: It is optional and preceded by a question mark (?). Query component contains a query string of non-hierarchical data.

Fragment component: It is an optional field and preceded by a hash (#). Fragment component includes a fragment identifier giving direction to a secondary resource.

Example of URI

No protocol mentioned

Domain not mentioned


Protocol mentions

ldap://[2001:db8::7]/c=GB?objectClass?one tel:+1-816-555-1212 telnet:// Confusion about URN

The problem with such a debate is that appropriate RFC are extremely dense and sometimes even contradictory. For example, RFC 3986 says, URI can be either a name, locator or both.

Why URL?

Here are the important reasons of using URL:

URL tells you how to access a particular resource.

URL is an address of a given unique resource on the Web, including webpages, images, files, media, web applications, etc.

Why URI?

Here are the important reasons of using URI:

A Uniform Resource Identifier is essential to the semantic web because it prevents ambiguity.

A URI search the name as well as the location of a resource or file, which is in a uniform format.

It has a string of characters for the specific filename and path.

URI provides a method for resources to be accessed by other systems over the World Wide Web or across a network. It is used by web browsers and P2P (Peer to Peer) file-sharing software to find and download files.

URI allows new file types to be defined without affecting old files you have.

You can assign a single resource to associate with multiple representations.

Difference Between URL and URI

Here are the main differences between URL and URI:


URL stands for Uniform Resource Locator. URI stands for Uniform Resource Identifier.

URL is a subset of URI that specifies where a resource is exists and the mechanism for retrieving it. A URI is a superset of URL that identifies a resource either by URL or URN (Uniform Resource Name) or both.

The main aim is to get the location or address of a resource The main aim of URI is to find a resource and differentiate it from other resources using either name or location.

URL is used to locate only web pages Used in HTML, XML and other files XSLT (Extensible Stylesheet Language Transformations) and more.

The scheme must be a protocol like HTTP, FTP, HTTPS, etc. In URI, the scheme may be anything like a protocol, specification, name, etc.

Protocol information is given in the URL. There is no protocol information given in URI.


It contains components such as protocol, domain, path, hash, query string, etc. It contains components like scheme, authority, path, query, fragment component, etc.

All URLs can be URIs Not all URIs are URLs since a URI can be a name instead of a locator.

You're reading Url Vs Uri: Key Difference Between Them

Update the detailed information about Url Vs Uri: Key Difference Between Them on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!