What Links To Use Within The Website: Relative Or Absolute

Many amateur SEO specialists and webmasters wonder, what links to use on the website. Some specialists believe that it makes more sense to use relative links, while others assure that it’s best to use absolute links. In this post we’ll try to figure out the difference between these types of links and how and when to use them.

First, Let’s Figure Out, How Does A Link Looks Like And What Code Is Used To Create It

how to links look like

In this example we’ve used a relative link where pagename.html is a page that you’ll be transferred to after clicking on “page about car”. You can see that this link doesn’t have a full address (full web address includes attrebutes http://www).

Here Are Some Examples Of Relative And Absolute Links:

Relative links

  • index.html
  • /graphics/image.jpg
  • /main-folder/folder/file.html

Absolute links

  • http://www.mysite.com
  • http://www.mysite.com/graphics/image.jpg
  • http://www.mysite.com/main-folder/folder/file.html

The first visible difference is that absolute links always include the website domain name, including http://www, while relative links only specify the file or the path to the file.

When a user clicks a relative link, browser understands it as a path to a place on the current website. Therefore you can use relative links only to make internal links to files or pages, while it is recommended to use absolute links when referencing to a page or a file on another website.

Let’s consider advantages of relative links over absolute in more detail, what are the differences between the two and which one is it better to use?

Absolute Links Have The Following Advantages:

  • Active links are fully transferred to the copier’s website during automated copying;
  • Search engines better determine the main website mirror;
  • Proper work in RSS readers;
  • Page loads much faster, when files hosted on a third party server are used;
  • No problems with rel=”canonical”;
  • Safer in case of the site hack;
  • Safer when transferring to a new CMS;
  • Best to use when distributing content by e-mail.

Absolute link

Advantages Of Relative Links With No Protocol:

  • When http: and https: are used, there are now problems with protocols;
  • Google recommends to skip the protocol

Relative link

Relative Links Without The Host Name Have The Following Advantages:

  • No need to change the path in internal links when transferring to a new domain;
  • No problems in case if the website is hosted on several domains;
  • Makes the HTML code shorter, which also affects the website loading speed;
  • Short URL.

Relative Links That Are Detected By The Current Location Have Following Advantages:

  • Allow to test the website without connecting to the internet;
  • It’s easier to move an object to folders.

Conclusion

It may be concluded that there is no absolute advantage in using one of the link types. Both linking options are important for the SEO and one only needs to use them properly, taking into consideration the advantage of each type listed above.