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.
- A URI is an identifier of a specific resource. Like a page, or book, or a document.
- 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.
- 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.
- 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.
- 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.
- 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.
- Fragments like file.htm actually are not URNs, because URNs are required to use a special notation with urn: in the beginning.
- 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…
- The RFCs are ancient, poorly written, and not worth debating until they’re updated.
- A URI is an identifier.
- A URL is an identifier that tells you how to get to it.
- Use the term that is best understood by the recipient.
*RFC
: RFC(Request for Comments) 문서는 비평을 기다리는 문서라는 의미로, 컴퓨터 네트워크 공학 등에서 인터넷 기술에 적용 가능한 새로운 연구, 혁신, 기법 등을 아우르는 메모를 나타낸다.
URL
For more Information: