Skip to content
Search

Uniform Resource Identifier

lastmod 2026-02-23created 2019-02-1912 edits

A Uniform Resource Identifier (URI) is a unique address that represents a resource on the Internet. The existence of URIs is a basic requirement of the Internet, and they always accompany Internet protocols.

The protocol form above is an example following the notation of the URL format, which is one kind of URI.

URL and URN are subconcepts of URI.

Notation

The generic URI and absolute URI reference syntax was first defined in RFC 2396, published in August 1998, and finalized in RFC 3986, published in January 2005.

A generic URI has the following form:

scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]

URL (Uniform Resource Locator)

A URL (Uniform Resource Locator; North Korean standard terms: "file identifier", "unique resource pointer") is a convention for indicating where a resource is located on a network.

It is commonly thought of as a website address, but a URL can represent not only website addresses but any resource on a computer network. To access that address, you need to know the protocol that matches the URL and connect using that same protocol.

For the FTP protocol, you need to use an FTP client, and for HTTP, a web browser. For Telnet, you need to connect using a Telnet program.

Name structure

  • A URL begins with the name of the protocol that defines how to access the resource, such as gopher, telnet, ftp, http, or usenet.
  • After the protocol name comes ":", the delimiter that separates the protocol name.
  • If the protocol requires IP or Domain name information, "//" is written after ":".
  • After the protocol name delimiter ":" or "//", protocol-specific information is added.

URN (Uniform Resource Name)

URN (Uniform Resource Name) is the historical name for URIs that use the urn:scheme. URNs were defined in RFC 2141 in 1997 for use as identifiers for persistent, location-independent resources.

Syntax

Expressed in Backus–Naur Form, the URN syntax is as follows.

<URN> ::= "urn:" <NID> ":" <NSS>

In actual use, it is written as

urn:<NID>:<NSS>

. <NID> is the namespace identifier.

URI vs URL

Uniform Resource Identifier (URI) consists of a string of characters used to identify or name a resource on the Internet (http://en.wikipedia.org/wiki/URI) A URI can be interpreted as something like a string composed to identify a resource on the Internet. A URL, one form of URI, indicates the location of a resource on the Internet. (http://en.wikipedia.org/wiki/URL) A URL is a form of URI; in other words, URI is a concept that includes URL. (URI > URL)

The location of a resource on the Internet, and an identifier. At first glance they seem to mean the same thing. But keep in mind that 'the location of a resource' ultimately means 'the location of a single file'.

http://img0.gmodules.com/ig/images/korea/logo.gif

A form like this means the location of a resource on the Internet called logo.gif. It can be said to be both a URI and a URL. What about the following?

http://endic.naver.com/endic.nhn?docid=1232950

The endic.nhn file located on the server http://endic.naver.com/ produces different results depending on the value of docid, a query string. Here, the URL is up to http://endic.naver.com/endic.nhn, which indicates the location of endic.nhn. To reach the information I want, the identifier (Identifier) ?docid=1232950 is needed. So the address http://endic.naver.com/endic.nhn?docid=1232950 above is a URI but not a URL.

Slug

A slug originally refers to a way of writing headlines in newspapers, magazines, and the like using only words that carry important meaning. It expresses a long title simply and clearly by dropping particles, prepositions, and so on, and combining the words that carry the core meaning. It is an editing method used by newspapers and others that have to handle many articles.

The slug used in WordPress also seems to come from this method. In particular, when you write the title of a page or post, WordPress automatically generates this slug. It replaces spaces with hyphens (-) and automatically removes symbols such as commas and periods.

This Slug is especially useful for Search Engine Optimization. If the page address (url) uses keywords that carry meaning, it helps search engines find the page faster and deliver accurate search results.

Slug vs ID

  • Slug vs ID
  • Friendly, human-readable URLs
  • Does not expose the application's actual resource IDs

Slugs add a bit of complexity because they are not generated from the database's auto-increment ID.

The application has to generate a candidate slug, check that it is unique in the database table, and repeat if necessary.

For comparison itself, IDs are faster, so use them as Foreign Keys in the DB.

Libraries

Favorite site

author Zer0 sitemap