How to Use Relative Links in SharePoint (3 Steps)

By Janice Uwujaren

A relative link displays the partial URL of an object relative to its location in a site or domain.
i Ryan McVay/Photodisc/Getty Images

There are two types of links used in the SharePoint environment: absolute and relative. The first step to understanding how to use relative links in SharePoint is recognizing the key differences between both types of links. An absolute link is an exact address of where an object exists or the explicit Uniform Resource Locator (URL) of that object. A relative link is an abbreviated URL based on the location of an object. Relative links in SharePoint are designated as server-relative, site-relative or folder-relative, based on whether you plan to use the server, site or folder as a base for the relative link.

Step 1

Use the file name of an object, when creating a relative link to an object within the same site. For example, if the site name is http://sitename/asite and you want to link to a file called image.jpg, the relative link for that object is image.jpg.

Step 2

Add the site name with a preceding slash to create a relative link to an object that is in a site or directory above the current site. For example, if you want to link to an object called test.html under the site http://sitename/bsite, the relative link for that object is ../bsite/test.html.

Step 3

Create a link to a subdirectory within the same site by adding the subfolder or directory name without the preceding slash. For example, if you want to link to an object called project.aspx under the tasks subfolder of http://sitename/asite, the relative link is tasks/project.aspx.

×