A relative path describes the location of a file in relation to the recent directory. It is different from the absolute path, which gives an exact location in the original directly rather than the currently used one. Unlike absolute path, relative path doesn’t include the domain of the site as it only points to a specific file.

While linking pages within your website, one can use the relative links. By clicking on the relative link, one can view where the linked page is located on the current site.

Some alternative names of it are non-absolute path or partial path. It only has a portion of the full path URL which is also based upon the directory it is linking to.

How to determine the relative URL path:

  • First, consider the URL of the page, for instance, it would be https://www.rectontechwiz.com/web-typography-110-6743003
  • Now, see the directory of the page, and here that is /web-typography-110-6743003

The (/) present in the starting of the path commands the browser to go to the root of the directory and from there you can pick whatever document you would like to be linked.

So, we can say that to be able to link off-site, we require absolute path and to link any page or folder within the same site, we can use the relative path.