A URI is a standardized identifier used to name or locate a resource, such as a web page, file, email address, API endpoint, or database record. The formal specification, RFC 3986, defines a Uniform Resource Identifier as a compact string of characters used to identify an abstract or physical resource [source: RFC Editor]. In plain terms, a URI tells software what something is, where it may be found, or both.
TLDR: A URI is a structured identifier for a resource, and a URL is the most familiar type of URI. For example, https://example.com/products?id=42 identifies a product page and includes a scheme, host, path, and query string. In a typical web analytics setup, a team may track 10,000 page requests per day by their URIs to see which product pages get the most traffic. Clean URIs reduce errors, improve reporting, and make APIs easier to use.
Contents
What Is a URI?
URI stands for Uniform Resource Identifier. It is a consistent way to identify resources across systems. That resource can be almost anything: a web page, an image, a document, a user profile, an order number, or a service endpoint.
A URI does not always have to tell you where a resource is located. Sometimes it only names the resource. This is where people often get stuck, and honestly, it feels like the terminology was built to make simple things sound harder than they are.
The most common URI you see every day is a web address:
https://www.example.com/articles/uri-definition
This URI points to a resource on the web. It can be used by a browser, crawler, API client, or monitoring tool.
URI vs URL vs URN
The words URI, URL, and URN are related, but they are not identical.
- URI: The broad category. It identifies a resource.
- URL: A URI that also provides a location and access method.
- URN: A URI that gives a persistent name, without saying where to fetch it.
A URL is what most people mean when they say “web address.” For example:
https://store.example.com/shoes/running
This tells the browser to use HTTPS, contact store.example.com, and request the path /shoes/running.
A URN looks different:
urn:isbn:9780131103627
This identifies a book by ISBN. It names the resource, but it does not tell your browser where to download or buy it.
Basic Parts of a URI
A URI can include several components. Not every URI uses all of them.
- Scheme: The protocol or identifier type, such as
https,mailto,ftp, orurn. - Authority: The domain name or host, often with a port number.
- Path: The specific resource location within the host.
- Query: Extra parameters, often used for filtering, searching, or tracking.
- Fragment: A section marker inside a page or resource.
Here is a full example:
https://api.example.com/users/58/orders?status=paid#summary
In this URI, https is the scheme. api.example.com is the host. /users/58/orders is the path. ?status=paid is the query. #summary is the fragment.
Common URI Examples
URIs appear in many formats, not only as website links.
- Web page:
https://example.com/about - Email address:
mailto:support@example.com - Phone link:
tel:+12025550123 - File reference:
file:///Users/admin/report.pdf - API endpoint:
https://api.example.com/v1/customers - ISBN name:
urn:isbn:9780143127741
Each example uses a scheme at the start. That scheme tells software how to interpret the rest of the string.
Where URIs Are Used
URIs sit behind much of modern software. They are small, but they carry a lot of responsibility.
1. Websites and Search Engines
Every public web page needs a URI. Search engines index these identifiers. Analytics tools group traffic by them. Content teams use them to track performance.
For example, a news site may compare traffic to:
/politics/election-results
/sports/final-score
/business/market-update
If those paths are stable and readable, reports are easier to understand. If they change every week, expect confusion. It drives me crazy that some systems still generate long, random page paths that add several seconds to every manual report review.
2. APIs and Backend Services
APIs rely heavily on URIs. A well-designed API uses clear resource paths:
GET /customers
GET /customers/123
GET /customers/123/invoices
These URIs make the service easier to test and document. Developers can guess the structure without opening five tabs of documentation. That saves time and reduces mistakes.
3. Mobile Apps
Mobile apps use URIs for deep links. A shopping app might open directly to a product with a URI such as:
shopapp://product/8472
This allows an email, ad, or push notification to send the user to the exact screen they need. Without deep links, users often land on the home screen and must search again. That extra friction can hurt conversions.
4. Databases and Knowledge Systems
Large systems often use URIs to identify records in a stable way. A product, person, invoice, or asset can receive a unique identifier. This helps link data across tools.
For example:
https://data.example.org/customer/24591
This URI can represent one customer record in a business data system. Other systems can refer to the same customer without copying every detail.
5. Security and Access Control
Security tools inspect URIs to detect suspicious activity. Firewalls, logging systems, and access rules often check paths and query strings.
For example, a security rule may block requests containing:
/admin/export?all=true
URI design matters here. Vague paths make rules harder to write. Clear paths make monitoring simpler.
Good URI Design Practices
Good URIs are stable, readable, and predictable. They should not expose private data or internal system details.
- Use readable paths: Prefer
/products/running-shoesover/p?id=8841when possible. - Keep them stable: Changing URIs breaks bookmarks, search rankings, reports, and integrations.
- Use lowercase: Mixed case can cause duplicate or broken paths on some systems.
- Avoid sensitive data: Do not place passwords, tokens, or private identifiers in query strings.
- Encode special characters: Spaces, symbols, and non-English characters may need percent encoding.
The catch is that encoding errors can be hard to spot. A missing percent sign or an unescaped character may turn a valid request into a frustrating 400 response.
Why URIs Matter
URIs are more than technical labels. They shape how systems communicate. A clean URI can help a browser load a page, an API return the right data, a search engine index content, and an analytics tool measure behavior.
For business teams, URIs affect reporting and customer experience. For developers, they affect maintainability. For security teams, they affect monitoring and control.
The best rule is simple: treat every URI as a public contract. Make it clear. Keep it consistent. Change it only when there is a strong reason, and redirect old versions when you must.