URL Types

By: Dusty Arlia
Published on August 21, 2012
Last Updated on Friday, July 17, 2015 at 4:13 PM
Total Updates: 6

URL stands for Uniform Resource Locator (or Universal Resource Locator). It is a path to a file located on the web. There are three types of paths:

Absolute Path: An absolute path includes http:// (or https://), the hostname, the folders, and the filename. (Example: http://www.whiterootmedia.com/todays/news/index.html)

Root-Relative Path: A root-relative path indicates where the file is located in relation to the root folder. It does not include http:// (or https://) or the domain name. It begins with a forward slash (/) indicating the site's root folder. (Example: /todays/news/index.html). A simple way to determine a file's root-relative path is to take its absolute path and strip its http:// (or http://) and host name.

Document-Relative Path: The document-relative path indicates where the file is located in relation to the current .html webpage. Depending on what webpage you are on, the document-relative path to the same file might be different. You won't be able to use the same document-relative path if you change directory levels (how many folders down from the root folder [/]). Use "../" to go up one directory (folder) and use "../../" to up two directories ([../../../] three directories, etc.).