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.com is also a URI, and a URN like urn: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:0451450523 uniquely 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
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
Where to find real system design interview questions from large tech firms
Discover where to find real system design interview questions from Google, Meta, Amazon, and more. 15+ verified sources ranked by quality. Start practicing now.
Compare cloud infrastructure options for distributed applications
Compare AWS, Azure, and GCP for distributed system design. Covers compute, storage, databases, messaging, Kubernetes, pricing, and how to discuss cloud choices in interviews.
What is Server-Side Caching vs Client-Side Caching?
At-Least-Once vs At-Most-Once vs Exactly-Once: Where to Use Each?
At most once can drop a message, at least once can repeat one, and exactly once costs coordination. Here is what each guarantee promises, what it costs, and which flows in a real system need which one.
How do you mitigate the thundering herd problem?
Learn how to mitigate the thundering herd problem in distributed systems with proven techniques like request coalescing, stale-while-revalidate caching, jittered retries, and rate limiting. A complete system design interview guide for handling traffic spikes and cache stampedes effectively.
What is the Two Generals' Problem?
Related Courses
New
Grokking Agentic Design Patterns course cover
Grokking Agentic Design Patterns
Design agents that act safely, recover from failure, and justify their cost.
4.9
(561 learners)
Discounted price for Your Region

$98

New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$98

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.