What Is a URI? Definition, Examples, and Uses

A URI is a text identifier that names or points to a resource, such as a web page, file, email address, book, API endpoint, or database item. RFC 3986 defines a Uniform Resource Identifier as a compact string of characters used to identify an abstract or physical resource [source: IETF]. A URI may tell software where something is, what something is called, or both. That is why URIs sit behind websites, apps, APIs, QR codes, feeds, bookmarks, and many internal systems.

What Does URI Mean?

URI stands for Uniform Resource Identifier. It is “uniform” because it follows a shared format. It is a “resource” because it identifies something useful. It is an “identifier” because its job is to point to one thing, name one thing, or separate one thing from another.

A resource does not have to be a web page. It can be a PDF file, an image, a customer record, a payment request, a podcast episode, a book number, or even a concept in a knowledge graph. The URI gives that resource a label that software can read.

In plain terms, a URI answers this question: “Which resource is being discussed?”

URI vs URL vs URN

The terms URI, URL, and URN are often mixed up. Honestly, it feels like software docs enjoy making this more annoying than it needs to be.

  • URI: The broad category. It identifies a resource.
  • URL: A type of URI that gives the location of a resource and often how to access it.
  • URN: A type of URI that gives a persistent name, not a location.

For example, https://example.com/blog/uri-guide is a URL because it tells a browser where to find the page. It is also a URI because it identifies that page.

By contrast, urn:isbn:9780143127796 is a URN. It identifies a book by ISBN. It does not tell a browser where to download or buy it.

Basic Parts of a URI

A URI can be short or long, but many follow a structure like this:

scheme://authority/path?query#fragment

Each part has a job:

  • Scheme: The first part, such as https, mailto, ftp, or urn.
  • Authority: Often the domain name, such as example.com.
  • Path: The resource location inside the site or system, such as /products/42.
  • Query: Extra data after a question mark, such as ?color=blue.
  • Fragment: A section marker after a hash symbol, such as #pricing.

Not every URI uses every part. For example, mailto:billing@example.com has a scheme and an address, but it does not need a domain path like a web page.

Common URI Examples

Here are practical examples of URIs in everyday systems:

  • Web page: https://example.com/about
  • API endpoint: https://api.example.com/users/123
  • Email address action: mailto:hello@example.com
  • Phone action: tel:+15551234567
  • Local file: file:///Users/admin/report.pdf
  • Book identifier: urn:isbn:9780307476463
  • Data URI: data:text/plain,Hello

These examples show why the word “identifier” matters. Some URIs open a page. Some start an email. Some name a record. Some carry data directly.

Image not found in postmeta

How URIs Are Used

Web browsers use URIs constantly. When a person clicks a link, the browser reads the URI and requests the matching resource. Search engines also store and compare URIs to track pages across the web.

APIs rely on URIs to expose resources. In a REST-style API, a user record may be available at /users/123, while that user’s orders may sit at /users/123/orders. Clean URI design makes APIs easier to test and maintain.

Mobile apps use URIs for deep links. A URI can open a specific product page inside an app instead of loading the home screen. That saves taps and reduces drop-off.

Databases and content systems use URIs to avoid confusion. If a company has three articles titled “Pricing,” a stable URI tells editors and software which one is meant.

QR codes often encode URIs. A restaurant menu QR code may store https://restaurant.example/menu. When scanned, the phone reads the URI and opens the resource.

Why URIs Matter

URIs create consistency. A system can only share, cache, index, and secure resources when it can identify them. Without stable identifiers, links break, analytics split traffic, and support tickets get messier.

Small changes have real effects. If an ecommerce site changes /shoe/245 to /shoes/245 without a redirect, bookmarks, ads, and search results may fail. Expect to waste time on cleanup when teams rename paths without a plan.

A good URI is readable, stable, and specific. Compare these two:

  • https://example.com/p?id=88421
  • https://example.com/products/running-shoes

The second one is usually easier for people to read. The first may still work well for software, but it gives less context.

Best Practices for URI Design

  • Keep URIs stable: Do not change them unless there is a strong reason.
  • Use clear words: /orders is better than /x92 for most public paths.
  • Use lowercase where possible: Mixed case can create avoidable errors.
  • Avoid spaces: Use readable path segments instead.
  • Prefer nouns for resources: /customers/17 is cleaner than /getCustomer17.
  • Use redirects after changes: This protects users, search traffic, and analytics.
  • Do not expose secrets: Tokens and private data should not sit in visible URIs unless properly protected.

FAQ

Is every URL a URI?
Yes. A URL is a type of URI. It identifies a resource and gives its location.
Is every URI a URL?
No. A URI may only name a resource. A URN such as urn:isbn:9780143127796 is a URI, but not a URL.
What is the simplest URI example?
https://example.com is a simple URI. It identifies the home page of a website and tells a browser how to reach it.
What is a URI scheme?
The scheme is the first part of a URI. Examples include https, mailto, tel, file, and urn.
Can a URI point to something that is not online?
Yes. A URI can identify a book, local file, internal record, or abstract concept. It does not have to point to a live web page.
Why do broken URIs cause problems?
Broken URIs stop users and software from reaching the right resource. They can hurt search rankings, reports, app flows, and customer support.
Lucas Anderson
Lucas Anderson

I'm Lucas Anderson, an IT consultant and blogger. Specializing in digital transformation and enterprise tech solutions, I write to help businesses leverage technology effectively.

Articles: 1073