Uniform Resource Identifier (URI)

What is a uniform resource identifier?

In Internet technologies, a Uniform Resource Identifier (URI) uniquely identifies an abstract or physical resource on the web. Internet protocols use these series of characters to pick apart multiple resources and enable interactions among them. 

The standard web address, the Uniform Resource Locator (URL), is one of the most well-known instances of URIs. It helps identify exact websites, though other URIs can identify images, electronic documents, and other resources. These resources do not necessarily connect to the Internet, either. 

What advantages do uniform resource identifiers provide? 

The main “selling points” for Uniform Resource Identifiers include: 

  • Universal compatibility. URIs cover every Internet resource and give unique identities to everything on the web. 

  • Expandability. Any future content on the worldwide web may receive new identifiers under the URI system, ensuring future compatibility. 

  • Mutability. URIs are changeable, and users can share and edit them as necessary. 

URIs streamline resource management in online contexts, hence why the Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C) collaborated to produce this standard. 

Programmers often use URIs to test out Application Programming Interfaces (APIs), tools which allow two applications to communicate. One program sends a request containing a URI to get in touch with the other application. 

What is the structure of a uniform resource identifier? 

The Internet Engineering Task Force Request for Comments (RFC) 3986 defines the general syntax of URIs, which contains the following components. 

  • Scheme. The first section establishes URI syntax and protocols. The Internet Assigned Numbers Authority (IANA) optionally registers URI schemes. A colon follows the scheme in a URI. 

  • Authority host. What follows is either an IP address or a registered name. 

  • Authority authentication. This optional component contains the username and password with a colon in the middle, followed by an @ symbol, a hostname, and then a colon. 

  • Port number. Another optional section following the previous colon is the port number. 

  • Path. Much like how file paths work in desktop operating systems, this section is a sequence of strings with slashes between them, implying a hierarchical structure. The path may be empty in some URIs. 

  • Query. A question mark comes next to separate the preceding components of the URI from another optional component, the query. 

  • Fragment. A hashtag follows to allow for an optional component on the end of a URI, the fragment. This component identifies a secondary resource or a specific part of the overall resource. For instance, if a web article contains multiple sub-headers, a fragment tells the web browser to scroll to a specific section instantly. 

This structure for URIs provides consistency and simplicity. Even different types of identifiers can work together in various contexts. 

What types of uniform resource identifiers exist? 

Three primary forms of URI are the aforementioned Uniform Resource Locators (URLs), Uniform Resource Names (URNs), and Uniform Resource Characteristics (URC). 

Uniform Resource Locator (URL) 

URLs associate with specific webpages and help identify them uniquely. They also guarantee access to the resources they refer to, unlike general URIs which don’t necessarily imply accessibility. 

URLs contain extra components like a domain, a subdomain, and a protocol to tell web browsers not only where a webpage is but also how to find and access its data. 

The protocol of a URL changes depending on the type of resource: 

  • Webpages have Hypertext Transfer Protocol (HTTP) or HTTPS, its secure variant. 

  • Email addresses have the “mailto” protocol. 

  • Files begin with the File Transfer Protocol (FTP). 

It’s worth noting URLs are location-dependent. If a webpage moves, the URL will also need to change to reflect the new location. 

Uniform Resource Name (URN) 

URNs are a more permanent type of URI than the URL; they identify a resource and operate independently of the resource’s location. They are also persistent, so they don’t change regardless of whether the resource is still available. 

The first three characters of the code are always “urn,” followed by a colon and a unique character string as the identifier. 

Uniform Resource Characteristics (URC) 

The lesser known of the URI types is Uniform Resource Characteristics. These take the form of metadata to describe a resource. A document might have its properties in a URC, such as encoding and access restrictions. URC is readable by both humans and computers. 

URC is not as popular, as it did not become standard practice in web technologies, though it still contributed to the evolution of web identifiers. 

What are the benefits of URI? 

Using URIs can help users and applications access and share information more easily and efficiently. URIs can also help organize and categorize resources based on their names, types, or properties. URIs can also be used to link related resources together, such as web pages, documents, images, or videos. 

How does Sinch work with URI? 

Sinch uses URIs to identify and communicate with various resources on our platform, such as users, conversations, messages, media, or channels.  

Similarly, when you send or receive a message with Sinch Conversation API, you will use URIs to specify the sender, recipient, content type, and content URL of the message.