{"id":26612,"date":"2021-01-10T09:46:07","date_gmt":"2021-01-10T09:46:07","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=26612"},"modified":"2025-05-17T06:16:03","modified_gmt":"2025-05-17T06:16:03","slug":"what-are-the-differences-between-uri-url-and-urn","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/what-are-the-differences-between-uri-url-and-urn\/","title":{"rendered":"What are the differences between URI, URL and URN"},"content":{"rendered":"<h1>Difference Between URI, URL, and URN<\/h1>\n<h2>URI<\/h2>\n<p><strong>URI (Uniform Resource Identifier):<\/strong> A URI is a generic term used to identify a resource, either by its name, location, or both. It is an umbrella term that includes both URLs and URNs.<\/p>\n<p><strong>Examples:<\/strong><\/p>\n<ul>\n<li><code class=\"\" data-line=\"\">https:\/\/example.com\/resource<\/code> (a URL, as it specifies the resource&#8217;s location)<\/li>\n<li><code class=\"\" data-line=\"\">urn:isbn:978-3-16-148410-0<\/code> (a URN, as it names the resource without specifying a location)<\/li>\n<\/ul>\n<h2>URL<\/h2>\n<p><strong>URL (Uniform Resource Locator):<\/strong> A URL is a type of URI that specifies the location of a resource on the internet and the protocol to access it.<\/p>\n<p><strong>Components of a URL:<\/strong><\/p>\n<ul>\n<li><strong>Protocol:<\/strong> The scheme (e.g., <code class=\"\" data-line=\"\">http<\/code>, <code class=\"\" data-line=\"\">https<\/code>, <code class=\"\" data-line=\"\">ftp<\/code>).<\/li>\n<li><strong>Domain Name\/Address:<\/strong> The location of the resource (e.g., <code class=\"\" data-line=\"\">example.com<\/code>).<\/li>\n<li><strong>Path:<\/strong> The specific resource (e.g., <code class=\"\" data-line=\"\">\/resource\/page<\/code>).<\/li>\n<li><strong>Query Parameters (Optional):<\/strong> Extra details (e.g., <code class=\"\" data-line=\"\">?id=123<\/code>).<\/li>\n<\/ul>\n<p><strong>Example:<\/strong> <code class=\"\" data-line=\"\">https:\/\/www.example.com\/index.html<\/code><\/p>\n<p>&nbsp;<\/p>\n<h2>URN<\/h2>\n<p><strong>URN (Uniform Resource Name):<\/strong> A URN is a type of URI that names a resource uniquely but does not describe how to locate or access it.<\/p>\n<p><strong>Example:<\/strong> <code class=\"\" data-line=\"\">urn:isbn:978-3-16-148410-0<\/code><\/p>\n<h2>Key Differences<\/h2>\n<table>\n<thead>\n<tr>\n<th>Aspect<\/th>\n<th>URI<\/th>\n<th>URL<\/th>\n<th>URN<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Definition<\/strong><\/td>\n<td>General identifier of a resource<\/td>\n<td>Specifies the location and access method<\/td>\n<td>Names a resource uniquely without location<\/td>\n<\/tr>\n<tr>\n<td><strong>Type<\/strong><\/td>\n<td>Umbrella term that includes URL and URN<\/td>\n<td>A subset of URI<\/td>\n<td>A subset of URI<\/td>\n<\/tr>\n<tr>\n<td><strong>Purpose<\/strong><\/td>\n<td>Identifies a resource<\/td>\n<td>Locates and accesses a resource<\/td>\n<td>Names a resource persistently<\/td>\n<\/tr>\n<tr>\n<td><strong>Examples<\/strong><\/td>\n<td><code class=\"\" data-line=\"\">https:\/\/example.com<\/code>, <code class=\"\" data-line=\"\">urn:isbn:...<\/code><\/td>\n<td><code class=\"\" data-line=\"\">https:\/\/example.com<\/code><\/td>\n<td><code class=\"\" data-line=\"\">urn:isbn:978-3-16-148410-0<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Difference Between URI, URL, and URN URI URI (Uniform Resource Identifier): A URI is a generic term used to identify a resource, either by its name, location, or both. It is an umbrella term that includes both URLs and URNs. Examples: https:\/\/example.com\/resource (a URL, as it specifies the resource&#8217;s location) urn:isbn:978-3-16-148410-0 (a URN, as it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[],"class_list":["post-26612","post","type-post","status-publish","format-standard","hentry","category-testing-questions","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=26612"}],"version-history":[{"count":2,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26612\/revisions"}],"predecessor-version":[{"id":27395,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26612\/revisions\/27395"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=26612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=26612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=26612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}