URL vs URI vs URN

This topic might be very technical but it explains the different names and what are the different parts used to find a resource on the internet.

Let's take the following:

https://[email protected]:123/form/questions/?tag=networking&order=news#top

It consists of:

  • https: Scheme. This can be HTTP, HTTPS, FTP, MAILTO, IRC, FILE, etc
  • john.doe: Userinfo
  • www.example.com: host
  • 123: Port
  • [email protected]:123: Authority
  • /form/questions: Path
  • ?tag=networking&order=news: Query
  • #top: fragment

This full thing is called a Universal Resource Locator (URL). It's used to locate exactly where is the resource.

Meanwhile, Universal Resource Identifier (URI) is used to uniquely identify a resource but not necessarily how to locate it. So, URL is just a URN + Scheme (how to locate a resource)

Uniform Resource Name (URN) are names like URI but they should be unique across space and time. They are more regulated and they usually start with the prefix urn:.

Read more:

Last Updated: