Difference between revisions of "URIs URNs and URLs: What's the difference?"

From The Digital Classicist Wiki
Jump to navigation Jump to search
(struct; clarification)
(started definition of individual terms)
Line 1: Line 1:
==What's a URI and how is one different from a URL?==
+
==URI==
 +
 
 +
A '''Uniform Resource Identifier''' is a globally unique string that identifies a resource or entity. It should include a part that identifies the issuer or namespace of the identifier (for instance a web domain or scheme prefix), along with a part that identifies the entity within that scheme. There are various types of URI, some of which we talk about on this page.
 +
 
 +
==HTTP URI==
 +
 
 +
A HTTP (Hypertext Transfer Protocol) URI is a URI that begins with the characters "<code>http://</code>" followed by a Web domain, and then other text. It may, but need not, be the address of an information resource on the World-Wide Web.
 +
 
 +
==URL==
 +
 
 +
A '''Uniform Resource Locator''' is a HTTP URI that serves as the address of a web-page or other resource on the Web.
 +
 
 +
==How is a URI different from a URL?==
  
 
The short answer is that it isn't necessarily. All URLs are URIs, but not all URIs are URLs. URI stands for "Uniform Resource Identifier", meaning a string (sequence) of characters that can uniquely identify anything on the internet. URL stands for 'Uniform Resource Locator', meaning a string of characters that indicate where something can be found.  
 
The short answer is that it isn't necessarily. All URLs are URIs, but not all URIs are URLs. URI stands for "Uniform Resource Identifier", meaning a string (sequence) of characters that can uniquely identify anything on the internet. URL stands for 'Uniform Resource Locator', meaning a string of characters that indicate where something can be found.  

Revision as of 19:33, 14 November 2019

URI

A Uniform Resource Identifier is a globally unique string that identifies a resource or entity. It should include a part that identifies the issuer or namespace of the identifier (for instance a web domain or scheme prefix), along with a part that identifies the entity within that scheme. There are various types of URI, some of which we talk about on this page.

HTTP URI

A HTTP (Hypertext Transfer Protocol) URI is a URI that begins with the characters "http://" followed by a Web domain, and then other text. It may, but need not, be the address of an information resource on the World-Wide Web.

URL

A Uniform Resource Locator is a HTTP URI that serves as the address of a web-page or other resource on the Web.

How is a URI different from a URL?

The short answer is that it isn't necessarily. All URLs are URIs, but not all URIs are URLs. URI stands for "Uniform Resource Identifier", meaning a string (sequence) of characters that can uniquely identify anything on the internet. URL stands for 'Uniform Resource Locator', meaning a string of characters that indicate where something can be found.

In Linked Open Data, it is a best-practice to use a URL as the URI for any publicly available web-based resource that can be easily re-used by others. Meaning, the string 'http://opencontext.org/subjects/6A48C92B-E9DB-4CA0-1F9E-2F3ECEFC1C7C' is both the permanent identifier for that page describing a coin found at Petra, and the location where that page can be found. OpenContext goes a long way to making this clear by offering a 'Suggested Citation' that includes the URI. In general, combining the roles of URI and URL, which requires a commitment to the permanence of URLs, enables many of the benefits of Linked Open Data. In this context, 'URI' is often the preferred term within Digital Humanities and Linked Open Data. This usually means that in casual conversation, you can replace with 'URL' with 'URI' whenever somebody is talking about permanent, high-quality web-based resources.

Linked Data sites will often use URIs to refer to things that can't be retrieved on the internet, such as actual people or places. For example, the Virtual International Authority File (VIAF) URI for the Roman emperor Claudius is 'http://viaf.org/viaf/87172361'. When it is dereferenced, a redirect is issued by the server to 'http://viaf.org/viaf/87172361/' (note the trailing slash), which is VIAF's page about Claudius. Pleiades, on the other hand, uses 'http://pleiades.stoa.org/places/697725#this' (note the '#this' on the end of the URI) to refer to Petra the place, as opposed to the Pleiades article about Petra. This distinction is important to keep in mind, because in certain circumstances you may want to avod conflating web pages with real people or places.

See also Very clean URIs.

What's a URN?

URN stands for "Uniform Resource Name". All URNs are URIs. As the title implies, these provide a unique name for resources on the Internet, but unlike URLs they don't specify a way to retrieve them. To find the resource named by a URN, you have to use some sort of resolver service, such as CTS (Canonical Text Services), which uses URNs to refer to its resources.