What are the difference between URL, URI, and URN?
Understanding the differences between URL, URI, and URN can be crucial in web development and networking. Let's break down these concepts:
URL (Uniform Resource Locator):
- Definition: A URL is a specific type of URI that not only identifies a resource on the internet but also provides a method to locate it by describing its primary access mechanism, usually its network location.
- Components: It typically includes a protocol (such as HTTP, HTTPS, FTP), domain name, and path, optionally followed by query parameters or a fragment identifier.
- Example:
https://www.example.com/path?query=term#section - Key Characteristics:
- Specifies how the resource can be accessed (protocol).
- Includes the location of the resource (like a web address).
URI (Uniform Resource Identifier):
- Definition: A URI is a generic term used to identify a resource either by location, name, or both. It serves as a universal identifier for resources on the internet.
- Scope: All URLs and URNs are URIs, but not all URIs are URLs or URNs.
- Example: A URL
https://www.example.comis also a URI, and a URN likeurn:isbn:0451450523(identifying a book by its ISBN) is also a URI. - Key Characteristics:
- A more general concept than both URL and URN.
- It can be either a locator (URL), a name (URN), or both.
URN (Uniform Resource Name):
- Definition: A URN is a type of URI that names a resource without describing how to locate it. It’s used to assign a unique and persistent identifier to a resource.
- Example:
urn:isbn:0451450523uniquely identifies a book using its ISBN, irrespective of where it exists. - Key Characteristics:
- Provides a unique and persistent identifier.
- Does not specify a location or method to access the resource.
Summary of Differences:
- URL: Specifies both the identity and the location of a resource (How and Where).
- URI: A more comprehensive term covering both URLs (identifying and locating) and URNs (just identifying).
- URN: Focuses only on uniquely identifying a resource, not on where it is located or how to access it.
In practical terms, when you’re browsing the internet, you're mostly dealing with URLs. URIs and URNs come more into play in specific contexts like software development, digital libraries, and systems where unique and persistent identification of a resource is crucial.
TAGS
System Design Fundamentals
CONTRIBUTOR
Design Gurus Team
-
GET YOUR FREE
Coding Questions Catalog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
Explain Read-Your-Writes vs Monotonic Reads.
Learn the difference between read-your-writes and monotonic reads consistency models with clear examples, trade-offs, and interview tips. Perfect for system design prep and FAANG interviews.
What Is Event Sourcing?
Learn what event sourcing is in backend system design, with examples, trade-offs, and interview tips. Perfect for system design prep and FAANG interviews.
How do you implement policy engines with OPA/Gatekeeper?
Learn how to implement policy engines with OPA and Gatekeeper, including core concepts, evaluation flow, real world examples, pitfalls, FAQs, and system design interview insights tailored for modern distributed systems.
What is CORS and How to Fix It.
Learn what CORS (Cross-Origin Resource Sharing) is, why it causes errors, how to fix it, common trade-offs, and pitfalls. A clear, interview-ready guide for beginners and developers.
How would you implement TTL/expiry semantics reliably in databases?
Learn reliable TTL and expiry semantics for databases with read filters, sweepers, partition drops, and sliding TTL. Interview focused guide with examples, pitfalls, a comparison table, and links to DesignGurus.io courses.
Explain RBAC vs ABAC.
Learn the difference between RBAC and ABAC in database and system design. Use cases, examples, trade-offs, and interview tips to ace your next tech interview.
Related Courses

Grokking the Coding Interview: Patterns for Coding Questions
Grokking the Coding Interview Patterns in Java, Python, JS, C++, C#, and Go. The most comprehensive course with 476 Lessons.
4.6
$197

Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
3.9
$78

Grokking Data Structures & Algorithms for Coding Interviews
Unlock Coding Interview Success: Dive Deep into Data Structures and Algorithms.
4
$78
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.