+4 votes
102 views
URI and URL - what's the difference?

in Tips & Tricks by (552k points)
reopened | 102 views

1 Answer

+5 votes
Best answer

URI vs. URL
Now what is the difference between URI and URL?

All URLs are URIs, but not all URIs are URLs at the same time. Confusing? We explain the difference here..

image image

Terms like URL, URI and URN are circulating on the Internet - they all look identical to the naked eye. Although the acronyms are often used interchangeably, there are subtle differences. In this tipps + tricks article, we explain the characteristic differences and similarities.

URI vs. URL

According to the definition of the RFC, a Uniform Resource Identifier (URI) is a compact sequence of characters that identify an abstract or physical resource. This can be a page, a book or a document, for example. RFC stands for "Requests for Comments". These are numbered, technical and organizational documents on the Internet. The administration of these documents is carried out by the IETF (Internet Engineering Task Force). Most of the standards used on the Internet are published in RFCs.

The term Uniform Resource Locator (URL) refers to a subset the URIs. In addition to the actual identification, these also provide a means of localizing the resource. That is, the physical location can be obtained by describing the network location or the primary access mechanism. Network protocols such as HTTP/HTTPS or are common FTP . A URL therefore contains at the beginning HTTP/HTTPS if the resource is of the type "Web". Similarly, a URL begins with FTP if the resource is a file.

With regard to documents of the Internet standard , the term URN must also be differentiated. A Uniform Resource Name is a URI with the scheme urn , which serves as a permanent, location-independent identifier for a resource. A URN is used to assign a resource a clearly identifiable name that is permanently valid. The resource can be anything that can be clearly described. For urn:ISBN:3-8233-4429-1 example, a book can be clearly identified using its ISBN.

In summary, both URNs (names) and URLs (localization) are URIs. If the log ( HTTPS , FTP , etc.) is specified for a domain, you should address so a URL call - even if it is a URI. So you are more specific in your statement because the URL maps a certain type of URI that provides information about the access method or the location.

image
URNs and URLs are subsets of URIs.

Now what is the difference between URI and URL?

The source of the discussion about which term is used and when are the associated RFCs. For a better understanding, we recommend that you take a look at the relevant documents yourself. You can find the debated RFC 3986 at ietf.org here .

For example, RFC 3986 says that a URI can be a name, a locator, or both:

" A URI can be further classified as a locator, a name, or both. The term" Uniform Resource Locator "(URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (eg, its network “location”). "

(see RFC 3986 Section 1.1.3 )

The two terms URI and URL are often confused because they are quite closely related. For example, a URI can be a name, a locator, or both for an online resource where a URL is just the locator. URLs are a subset of URIs. That means, all URLs are also URIs. However, the opposite is not the case.

The difference can be simplified as follows: A URI is only an "identifier" and cannot necessarily be linked as a link - but a URL can. A URL makes it possible to interact with the corresponding resource when called up. This contains a scheme name such as ftp, http, mailto or telnet.

As an example of URIs, the RFC gives the following cases:

ftp://ftp.is.co.za/rfc/rfc1808.txt
http://www.ietf.org/rfc/rfc2396.txt

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

mailto:[email protected]

news:comp.infosystems.www.servers.unix

tel:+1-816-555-1212

telnet://192.0.2.16:80/

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

The list shows that it contains both URLs and URNs. Cases such as mailto and telnet also represent URLs, as these contain an exact scheme designation. If we now differentiate the cases, the following breakdown results as a final example:

  • https://heise.de - URL (https> shows where the resource is)
  • urn:ISBN:3-8233-4429-1 - URN (unique identification of a book)

by (3.5m points)

Related questions

+3 votes
1 answer
asked Nov 20, 2021 in Hardware by backtothefuture (552k points) | 108 views
+3 votes
1 answer
+4 votes
1 answer
asked Nov 20, 2021 in Tips & Tricks by backtothefuture (552k points) | 116 views
+4 votes
1 answer
asked Jun 23, 2021 in Guides by backtothefuture (552k points) | 169 views
+5 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users