Web Development/General Tech Knowledges

Difference between URI and URL

Nomad Kim 2021. 4. 6. 19:35

 

The terms “URI” and “URL” are often used interchangeably, but they are not exactly the same.

  1. A URI is an identifier of a specific resource. Like a page, or book, or a document.
  2. A URL is special type of identifier that also tells you how to access it, such as HTTPs, FTP, etc.—like https://www.google.com.
  3. If the protocol (https, ftp, etc.) is either present or implied for a domain, you should call it a URL—even though it’s also a URI.
All butterflies fly, but not everything that flies is a butterfly.

 

  1. A Uniform Resource Identifier (URI) provides a simple and extensible means for identifying a resource (straight from *RFC 3986). It’s just an identifier; don’t overthink it.
  2. For most debates about this that matter, URI is the superset, so the question is just whether a given URI is formally a URL or not. All URLs are URIs, but not all URIs are URLs. In general, if you see http(s)://, it’s a URL.
  3. URIs technically do require a scheme (see above), but the RFC also says they can be a name, locator, or both, so YOLO! My advice for anyone saying URIs do or do not require a scheme is to show them this article, because it’s the only thing I know of that highlights the contradictions in the RFC.
  4. Fragments like file.htm actually are not URNs, because URNs are required to use a special notation with urn: in the beginning.
  5. A little-known section of RFC 3986 actually speaks directly to the religious part of the argument, and seems to say we should say URI instead of URL.

Summary

What a mess. Here’s the TL;DR

  1. The RFCs are ancient, poorly written, and not worth debating until they’re updated.
  2. A URI is an identifier.
  3. A URL is an identifier that tells you how to get to it.
  4. Use the term that is best understood by the recipient.

 

*RFC

: RFC(Request for Comments) 문서는 비평을 기다리는 문서라는 의미로, 컴퓨터 네트워크 공학 등에서 인터넷 기술에 적용 가능한 새로운 연구, 혁신, 기법 등을 아우르는 메모를 나타낸다.

 

URL

 

For more Information:

danielmiessler.com/study/difference-between-uri-url/

nomadkim880901.tistory.com/360