Skip to main content

Relative and absolute links

There are two methods to specify a link between web pages:

  1. Relative link: This specifies the path from the current page to the destination page and looks something like ../../destinationpage You should use relative links for any links within your SiteBuilder website and to link to other sites in SiteBuilder. Inserting links via the links picker tool in SiteBuilder automatically creates relative links.
  2. Absolute path: This the full URL – eg starting with http://www.example.com/ – of the destination page. Use this form when linking to any external sites.

Using a relative link is more efficient. It also helps to reduce the risk of broken links, should you rename pages above the page containing the relative link.

The relative link is constructed based on your current page location in the structure relative to the destination page that you're linking to. So, you need to bear in mind the structure of your site.

Imagine this is the structure and you wish to insert a link in the ‘About’ page to the ‘News’ page:

Diagram of web pages with arrows around the levels

The relative link (denoted by the black arrows) is ../news/

For relative links, the http:// or www.warwick.ac.uk parts are not included.

Note that links work better if you include a trailing slash at the end. For example, ../news/ is better than ../news

You don't see a direct effect, but it makes the page more searchable and improves the time taken to display your pages, so it's a good habit to adopt.

Support

Telephone 73737
Email webteam at warwick dot ac dot uk
How to report a problem