
Difference Between URL and URI - carlsednaoui
http://stackoverflow.com/questions/176264/whats-the-difference-between-a-uri-and-a-url
======
danellis
My favourite example to give for this distinction is 'news' vs 'nntp'.

An 'nntp' URL specifies a specific message in a specific group on a specific
server, hence it always has an authority part. It's also indicating to use the
NNTP protocol to retrieve the message.

A 'news' URI, on the other hand, identifies a specific message by its message
ID, and leaves it to the user agent to choose a protocol and server.

(The distinction isn't quite that clear cut, as 'news' URIs _can_ specify a
server, making them more like URLs, but I think it conveys the difference.)

~~~
mapgrep
I hope one of the top two Stackoverflow answers steals this example and
appends it. It is better than any of the examples in the thread.

------
binarycrusader
On a somewhat related note:

<http://www.rfc-editor.org/rfc/rfc3986.txt>

From section 1.1.3:

    
    
       An individual scheme does not have to be classified as being just one
       of "name" or "locator".  Instances of URIs from any given scheme may
       have the characteristics of names or locators or both, often
       depending on the persistence and care in the assignment of
       identifiers by the naming authority, rather than on any quality of
       the scheme.  Future specifications and related documentation should
       use the general term "URI" rather than the more restrictive terms
       "URL" and "URN" [RFC3305].

~~~
gojomo
That's a _very_ related note!

The classic hierarchy ("URLs and URNs are distinct subsets of URIs") wasn't as
neat and useful as originally thought, so "it's just URIs now, with their own
scheme-specific qualities" is the modern thinking, as reflected by this
passage from RFC3986.

The modern answer to "What's the difference between a URI and URL?" is thus
very nearly 'Mu.'

------
eblackburn
I've met Jon Skeet and he sincerely is a really smashing chap. The cult of
Skeet on SO is getting a tad much.

(I find sycophantic behaviour a terrible trait)

------
finin
For completeness, IRIs should be mentioned as well.

~~~
alexchamberlain
Which are?

~~~
ElliotH
Internationalized URIs

------
tingletech
Multiple times I've called a URL a "URL" only to have some linked data
enthusiast "correct" you by saying "you mean URI".

