URI vs URL: Difference between revisions
Created page with "Category:URL [[Category:HTTP] Reference: https://en.wikipedia.org/wiki/URL Wikipedia: URL" |
m Dex moved page URL to URI vs URL |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This article explains the difference between a **URI (Uniform Resource Identifier)** and a **URL (Uniform Resource Locator)** — two terms that are often confused, misused, or presented as if they are fundamentally different. | |||
In reality: **a URL *is* a type of URI**. The URL adds one key piece: a **protocol/scheme that tells you how to access the resource**. | |||
== Context == | |||
- “URI vs URL” has been debated for decades — often unnecessarily. | |||
- The confusion mostly comes from evolving terminology. | |||
- Developers frequently say “URL” when they mean URI. | |||
== Core Concepts == | |||
=== What is a URI? === | |||
A URI identifies a resource by name, location, or both. | |||
Examples: | |||
* mailto:dex@pirho.net | |||
* urn:isbn:978-0131101630 | |||
* https://pirho.net/tools | |||
=== What is a URL? === | |||
A URL is a URI that tells you how to locate the resource. | |||
Example: | |||
* https://pirho.net/knowledgebase?article=uri | |||
=== URI vs URL vs URN === | |||
{| class="wikitable" | |||
! Term !! Meaning !! Locates? !! Example | |||
|- | |||
| URI || Any identifier || Maybe || mailto:dex@pirho.net | |||
|- | |||
| URL || URI with protocol || Yes || https://pirho.net | |||
|- | |||
| URN || Permanent name || No || urn:isbn:1234567890 | |||
|} | |||
== Practical Application == | |||
=== APIs === | |||
Endpoints are URIs, not necessarily URLs. | |||
=== Browsers === | |||
Browsers resolve URLs but internally use URI references. | |||
== Common Pitfalls == | |||
- Thinking “URL” and “URI” are interchangeable. | |||
- Forgetting URLs require a scheme. | |||
== Design & Architecture Considerations == | |||
* Use URI terminology for API design. | |||
* Use URL in user-facing documentation. | |||
== Troubleshooting & Diagnostics == | |||
Example URL breakdown: | |||
https://pirho.net/articles/uri?draft=true#definitions | |||
== Related Topics == | |||
* [[HTTP]] | |||
* [[DNS]] | |||
* [[RESTful API Design]] | |||
== References == | |||
* RFC 3986 — Uniform Resource Identifier | |||
Latest revision as of 16:49, 14 March 2026
This article explains the difference between a **URI (Uniform Resource Identifier)** and a **URL (Uniform Resource Locator)** — two terms that are often confused, misused, or presented as if they are fundamentally different. In reality: **a URL *is* a type of URI**. The URL adds one key piece: a **protocol/scheme that tells you how to access the resource**.
Context
- “URI vs URL” has been debated for decades — often unnecessarily. - The confusion mostly comes from evolving terminology. - Developers frequently say “URL” when they mean URI.
Core Concepts
What is a URI?
A URI identifies a resource by name, location, or both. Examples:
What is a URL?
A URL is a URI that tells you how to locate the resource. Example:
URI vs URL vs URN
| Term | Meaning | Locates? | Example |
|---|---|---|---|
| URI | Any identifier | Maybe | mailto:dex@pirho.net |
| URL | URI with protocol | Yes | https://pirho.net |
| URN | Permanent name | No | urn:isbn:1234567890 |
Practical Application
APIs
Endpoints are URIs, not necessarily URLs.
Browsers
Browsers resolve URLs but internally use URI references.
Common Pitfalls
- Thinking “URL” and “URI” are interchangeable. - Forgetting URLs require a scheme.
Design & Architecture Considerations
- Use URI terminology for API design.
- Use URL in user-facing documentation.
Troubleshooting & Diagnostics
Example URL breakdown:
https://pirho.net/articles/uri?draft=true#definitions
Related Topics
References
- RFC 3986 — Uniform Resource Identifier