Relative Link

Relative link is a link that is directly connected to the path that shows the file itself.

Here, the path can be anything that comes after the domain name.

It includes directories and slug too. Because relative link is not like a formal link structure.

In simple words, you can understand that a relative link is a Short link of a website that directly connects users to a particular file.

If you find any website for e.g. and you want to go to sites about.

Then just by typing “” you will easily reach the about of that website.

This type of small links are known as relative link.

What is a relative link in HTML for example?

A relative link is a link that is used to add a page in a website. Instead of showing complete URL, relative link only shows the relative link paths as their name mentioned.

Example : /about, /example etc.

How do you use the relative link?

As I said relative link provides a very short but accurate direction of the website to its users. Relative links are normally used to transfer users to different categories or different points in the same domain.

By using relative link in your website you can directly told user where to go in your site. Because each relative link has it’s own path name.

What are the pros of relative link ?

Relative link has numerous benefit. Some of the benefits are discussed below –

  • Relative link basically simplifies coding because when your website has huge number of pages then it is very complicated and time taking process to write the entire path for each pages.
  • If you use relative link for your website then you don’t need to transfer the whole portal to the new domain. And you also don’t need to re-code the whole thing because relative link automatically start working with the new domain.
  • Relative links increase the page loading speed of your website. As these links are short in size. So it don’t take too much time to open website.

What are the disadvantages of relative links ?

Hense relative links has so many benefits. It has some disadvantages too.

  • Relative links creates duplicate pages which is not good for the website.
  • Relative link is very easy to stole.
  • SEO experts have a rumor about relative links. They said relative links leads 404 error in site more often.

What is the difference between absolute and relative links ?

The main difference between the absolute and relative links are :

Absolute links contains the complete information but relative links only contain the path files of a website.

Relative link is dependent in nature but absolute links are independent in nature.

Relative link is the small portion of the whole but an absolute link is the total of whole.

Relative links sometimes become confusing but the absolute link is very easy to understand as it contains complete information.

Relative links can be coded easily but absolute links take little more time to code than relative link.