Skip to the content of the web site.

Web Site Maintainers • Contribute FAQ

Relative vs. Absolute Links

Use Relative Links!

Why?

What are relative links?

Examples

The following examples are taken from the source file of "help.html" at
http://www.lib.uwaterloo.ca/staff/webmaint/help.html
.

example:<a href="/index.html">

path analysis:

example:<a href="heuristics_analysis/index.html">

path analysis:

example:<a href="accessibility.html">

path analysis:

Note: Contribute will enter the relative path for you. But if you are editing the ssi for the right navigation you will need to manually adjust the relative URL so it will work properly. 

In the example below, the sec_navbar.html file is sitting in the ssi subdirectory. The files that the ssi is pointing to are located in the "faq" directory--one level up. Since Contribute thinks the ssi links are pointing to files in a directory one level up from the ssi it inserts ../ which means to go up one level.

Sample screen to illustrate relationship of relative links

When the ssi is incorporated into the file by the browser the link is actually pointing to a file in the same directory, and therefore the ../ is not needed.

For example, when the ssi on the addimage.html page is pointing to anchors.html, both files are on the same level.

If you have any queries or concerns about this page, please contact .
October 18, 2005