What Is Difference Between URI and URL? – POFTUT

What Is Difference Between URI and URL?


In IT systems we use a lot of different terms. URI and URL are one of the most popular terms used in IT especially in programming. They can be confused or used interchangeably but they are not the same. In this tutorial, we will explain URI, URL, differences, and similarities between URI and URL.

What Is URI (Unified Resource Identifier)?

Unified Resource Identifier or URI is used to provide name, locator, or both for an online resource. Online means can be accessed via a computer network like LAN, WAN, internet, etc.  URI is the most generic resource identifier where it can be used for different resources like Book, Web Page, QR Code etc. Here are some URI examples to understand. URI is defined with the RFC 3986 where URL is defined with the same RFC too.

ISBN 0-486-28557-3

urn:isbn:0-486-28557-3

https://www.poftut.com

What Is URL (Unified Resource Locator)?

Uniform Resource Locator or URL is a subset of the URI which means all URLs are also a URI. URL provides the scheme and location of the resource. URL resource is online which means it can be accessed from LAN, WAN, Internet-like network. URLs generally used in web browsers and applications in order to specify the remote resource like a web page, API, etc. Below are some URL examples. URL is defined with the RFC 3986 where URI is defined with the same RFC too.

https://www.poftut.com

smb://poftut.com

ldap://poftut.com:123

ftp://ftp.poftut.com/rfc/rfc1808.txt

http://www.poftut.com/rfc/rfc2396.txt

ldap://[2001:db8::7]/c=GB?objectClass?one

mailto:ismail@poftut.com

news:comp.infosystems.www.poftut.com

tel:+1-816-555-1212

telnet://10.0.0.1:80/

urn:oasis:names:specification:docbook:dtd:xml:4.1.2

URI vs URL

Well, let’s compare the URI with the URL. Simply we can say that URI is the most generic term which also includes the URL. We list things about URI vs URL.

  • URL is a `locator` where URI is `identifier`.
  • URL is specific for web resources where URI is general which contains URL.
  • URL has to have a protocol like http, ftp, tel etc where URI has not to have a protocol.
  • Both URL and URI can be used for relative and absolute links.
  • Both URL and URI can accept query parameters.
  • Both URL and URI can have fragmented identifiers.
  • According to the W3C definition URL and URI are the same thing where they can be used for each other interchangeably.
LEARN MORE  Windows Tracert Command Tutorial

Leave a Comment