The Internet is powered by acronyms. There’s HTTP which allows clients and servers to connect with each other and there’s SSL which is used to keep data secure. If you’ve spent any time working as a web developer, you’ve likely also encountered the URI vs URL acronyms.
The URL and URI acronyms may look similar, but they do have subtle differences. It doesn’t help that many developers themselves don’t know the difference between them, but we’re here to make sure you are aware.
In this guide, we’re going to discuss the differences between URI vs URL.
What is a URL?
A URL, which stands for Uniform Resource Locator, is an identifier that tells your computer to access a resource on a web server. Many people confuse a URL with a domain name, but these are separate concepts.
- Career Karma matches you with top tech bootcamps
- Get exclusive scholarships and prep courses
On the Internet, computers rely on IP addresses to identify servers and connect to them. But inputting an IP address isn’t ideal for most people. IP addresses are a sequence of numbers. Who wants to remember a sequence of numbers to access a website?https://careerkarma.com/blog/url-vs-uri
A URL is all the information you need to access a resource on a website. Here’s an example of a URL taken from this web page:
This entire sequence of characters is a URL. Let’s break it down:
- HTTPS: This is the HTTP secure protocol that allows you to connect to this site.
- careerkarma.com: This is the domain name to which you are connecting.
- /blog/url-vs-uri: This is the resource on the Career Karma web server that you are accessing.
This string of characters tells our web servers what resource to send you. URLs can also contain query strings and other pieces of information.
In short, URLs allow web servers to locate a resource on a web server.
What is a URI?
A Uniform Resource Identifier is an identifier of a resource. A URI may refer to a web page, a book, or a document.
URLs are a type of URI because they allow you to identify a particular resource on the web. But URIs are not confined to web development.
URI vs URL vs URN?
There’s a third acronym that you might run into: URN, or Universal Resource Name. URNs are a type of URI, just like URLs. While URLs are location-dependent, URNs are not. A URN is a persistent, location-independent identifier.
For instance, the International Standard Book Number system uses a protocol called a Uniform Resource Name to identify individual books. URNs are also a type of URI because they allow you to uniquely identify a service.
When You Should Use a URI vs URL
You may be thinking to yourself: isn’t this all semantics? Does it really matter when I use URI vs URL? While other developers may use URL and URI interchangeably, there are specific instances where you should use one of the two.
The term URL should be used to identify a web resource. Here are a few example URLs:
The term URI can also be used to identify a web resource, but generally you should use the term URL. While all the above examples may also be URIs, a book number could also be a URI. This can result in confusion if you’re having a discussion featuring both URLs and URIs.
The rule is simple: All URLs are URIs, but not all URIs are URLs. URLs are a subset of URIs.
Uniform Resource Locators are a type of Uniform Resource Indicator that include the network location of a web resource. When you navigate to a website or access a web resource, you are accessing it through a URL. The web resource might be a file, login server, or something else,
URLs are technically URIs, but they are a more specific term used to describe how you interact with web resources. You’re best to use URI if you are talking about different types of identifiers. For instance, if you’re talking about both ISBN book numbers and URLs in the same discussion, you could refer to them both as URIs.
About us: Career Karma is a platform designed to help job seekers find, research, and connect with job training programs to advance their careers. Learn about the CK publication.