Absolute vs Relative Links

What is an absolute link?

An absolute link contains the entire address, from the protocol (HTTPS) to the domain name (www.example.com), and includes the location within the website in the folder system.

Basically, it's the full URL of the page that you link to.

An example of an absolute link is https://www.example.com/abc.html

What is a relative link?

A relative link does not use the full web address and only contains the location after the domain. It assumes that the link you add is on the same site and is part of the same domain.

The relative path starts with the forward slash and leads the browser to stay within the current site.

An example of a relative link is /abc.html

You should use absolute links when:

  • Sending someone away from the website.
  • Including a link in an email or social media.
  • Using deep links.

You should use relative links when:

  • Linking within the same website.

Using relative links is our recommended best practice for all councils using Tentaroo websites.

Using relative links will also help you if your domain name needs to change. Relative links do not need to be updated when a new domain name is required. We will create URL Redirects to handle any absolute links arriving at the old domain name.

 

We are always happy to assist with website training.