• Now all data be ready for publish, We had made our blog alive now. Haha.

  • These days CCP GFW blocked all the IPs from US and when I switch my IP in google Cloud, the disk data cannot be restore again. I have to restart my blog totally, Now the website is still building…

What is the difference between a URI, a URL and a URN?- Stack Overflow

Python PingBook 1 months ago (10-26) 17 0


People talk about URLs, URIs, and URNs as if they’re different things, but they look the same to the naked eye.

What are the distinguishable differences between them?


From RFC 3986:

A URI can be further classified as a locator, a name, or both. The
term “Uniform Resource Locator” (URL) refers to the subset of URIs
that, in addition to identifying a resource, provide a means of
locating the resource by describing its primary access mechanism
(e.g., its network “location”). The term “Uniform Resource Name”
(URN) has been used historically to refer to both URIs under the
“urn” scheme [RFC2141], which are required to remain globally unique
and persistent even when the resource ceases to exist or becomes
unavailable, and to any other URI with the properties of a name.

So all URLs are URIs (actually not quite – see below), and all URNs are URIs – but URNs and URLs are different, so you can’t say that all URIs are URLs.

EDIT: I had previously thought that all URLs are valid URIs, but as per comments:

Not “all URLs are URIs”. It depends on the interpretation of the RFC. For example in Java the URI parser does not like [ or ] and that’s because the spec says “should not” and not “shall not”.

So that muddies the waters further, unfortunately.

If you haven’t already read Roger Pate’s answer, I’d advise doing so as well.

Copyright from PingBook Blog, If not specified, they are original. This site uses BY-NC-SAProtocol authenticated.
For reprinting, please indicate the link of the original text:What is the difference between a URI, a URL and a URN?- Stack Overflow
LIKE (0)
We create, We sharing! Tag every value data your sharing
Submit comments
Cancel comments
emoji picture bold strikethrough center italic check in

Hi,you need to provide your name and email adress!

  • Name (Required)
  • Email (Required)
  • Website