URI, URL, URN: What’s the Difference?

If you work in eCommerce, you've probably heard the acronyms URI, URL, and URN before. But do you actually know what they mean and how they differ? 

Updated on
person taking notes next to laptop

If you work in eCommerce, you've probably heard the acronyms URI, URL, and URN before. But while they are sometimes mistakenly used interchangeably, each of these has a unique function. 

As you can see in the graphic above, uniform resource locator (URL) and uniform resource names (URN) are both technically subsets of uniform resource identifiers (URI). A URI is a string of characters used to identify a resource either by name or location (or both) on the internet, so a URL refers simply to the location of the resource itself while the URN refers to the resource’s name. That means that if you wanted to search a resource based on both its name and its location, you would search for a URI. To sum it up, URLs and URNs are both URIs, but as we’ve learned, these three terms are not interchangeable and represent different characteristics of a resource. So why does this matter?

It is very important to understand the distinction as multiple resources could have the same name; in that case, using a URN wouldn’t be very effective in locating the resource you’re looking for. This is the reason that using URLs is much more common, as they are used to access web pages, while URNs are used for other types of media. When you type in a URL in your search bar, you’re sending a request to the server at that address. In just a few seconds, the server responds to your request with the contents of the resource you sent for. This is one of the fundamental processes on the internet. URLs allow for creating links between pages and provide unique identifiers for each one, so they can help developers stay organized and help users find exactly what they’re looking for with ease as well.

A URL will always contain a protocol and a domain but can also have other information that leads to more precise areas of a website. This is an example: http://www.virid.com/blog. There are a few other identifiers that can follow a domain such as the port, the path, query strings, and fragments but we’ll save that for another blog post. URNs are permanent and unchanging so they are important for resources that you want to identify even if the resource moves. The three parts of the URN syntax include the case-sensitive leading scheme followed by a namespace identifier (NID) which identifies where a resource belongs, then a namespace specific string (NSS) which serves to identify the resource itself. Here’s an example: urn:oid:2.16.840. URNs are used only to identify what a resource is, not where it is and will always remain the same even if a resource changes location or becomes inactive. Since URNs are meant to be unique their persistent identifiers (NID) must be registered with the Internet Assigned Numbers Authority. The main use case for URNs is libraries or journals to identify specific books, articles and other content. 

Whether you’re sending an email, transferring a file or accessing a webpage we need URIs to do so. It’s important to understand how the internet really works if you want to effectively manage your eCommerce site. Team Virid appreciates you joining us on this knowledge journey, if you’re looking for more help building your website, migrating to a new eCommerce platform or have a particular eCommerce integration of challenge that’s holding you back, our eCommerce platform marketAgility might be the solution you’ve been searching for. Thanks for reading!

Connect with us on Linkedin, Facebook, X, Instagram, and TikTok to stay in touch.

Updated on