Fundamentals 9 min read

Understanding URI, URL, and URN: Concepts, Structure, and Usage

This article explains the definitions and relationships of URI, URL, and URN, illustrates how URLs are composed of protocol, domain, port, path and filename, and provides examples and RFC references to help readers grasp how web addresses locate resources.

IT Services Circle
IT Services Circle
IT Services Circle
Understanding URI, URL, and URN: Concepts, Structure, and Usage

When we open a browser to visit a website or an FTP server, we type a string such as https://blog.csdn.net/ or ftp://192.168.0.111/ , which yields an HTML page or a file; the meaning of this address is explained through URI, URL, and URN.

1. URI, URL, URN Concepts

URI = Uniform Resource Identifier

URL = Uniform Resource Locator

URN = Uniform Resource Name

A URI is an abstract identifier that can locate a resource by any method; a URL locates a resource by address, while a URN locates it by name. For example, finding a person in a village by address (URL) or by ID card and name (URN) both refer to the same underlying URI.

Originally, URI was envisioned to have two concrete forms: URL for address‑based location and URN for name‑based location. In practice, URNs are rarely used, so most URIs you encounter are URLs, making URL a subset of URI.

URL Definition

A URL (Uniform Resource Locator) tells the user where a resource resides on the Web. The resource can be an HTML page, a CSS file, an image, a video, etc.

Examples:

Accessing a web page via HTTP:

Downloading/uploading files via FTP:

Reading a local file on the client:

Protocol

The first part of a URL is the protocol (e.g., http, https, ftp, mailto). It indicates which method the browser should use to access the resource and is followed by "//".

Username/Password

Credentials can be included but are often omitted.

Domain Name

The domain (e.g., www.gitee.com ) is resolved to an IP address via DNS unless the IP is used directly.

Port

An optional port follows the domain, separated by a colon. Default ports are 80 for HTTP, 443 for HTTPS, and 21 for FTP.

Path / Filename

The segment after the first "/" up to the last "/" is the virtual directory; the part after the last "/" up to "?" or "#" is the filename. If the filename is omitted, the server serves a default file such as /index.html or /default.htm .

Example of a filename omission:

http://www.gitee.com/dir/ – the trailing slash implies a missing filename, so the server returns the default file.

http://www.gitee.com – no path at all, the server returns the root default file.

http://www.gitee.com/yikoupeng – the server treats "yikoupeng" as a file if it exists, otherwise as a directory.

RFC References

For detailed specifications, see RFC 3986 for URIs and the URL RFC (e.g., https://www.rfc-editor.org/). The following excerpt shows part of the URL specification:

Network Working Group                     T. Berners-Lee
Request for Comments: 1738                CERN
Category: Standards Track                 L. Masinter

Uniform Resource Locators (URL)

This document specifies a Uniform Resource Locator (URL), the syntax and semantics of formalized information for location and access of resources via the Internet.

Additional images illustrate how to browse the RFC repository.

WebnetworkingURLfundamentalsURIURN
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.