Content:

What does the relative link on the site mean

Relative link - this is a link that comes from root of the site or section, specified in the < base > tag. It looks like part of the address of the page with the excluded by domain name. Used for skipping pages within the same resource.

In HTML code, it looks like this:

что такое относительная ссылка

Unlike relative ones, absolute links contain complete URL- site page address including protocol (http or https) and domain.

чем относительная отличается от абсолютной ссылки

Get a free consultation from an SEO expert on your site

Which option to use

Speaking about choosing a link option, you need to understand that each type has its own purpose. In some cases, absolute is simply impossible to replace with relative ones: only they can be used for publication on third-party resources (donors). Otherwise, the system will not be able to understand which acceptor site they lead.

When placing relative links, you should remember that this tool is exclusively internal skipping. When moving between pages of one site in anchore it is not necessary to clarify its protocol or domain, the page is determined without them.

Why do you need relative links

Relative links are not easy to use when reinstalling pages because of their laconicity. They are make it easy to transfer the web resource to another domain or change the protocol from http to https. If you need to make such changes, all links will remain relevant and they will not have to be changed on the site.

Also if the development of the web resource was carried out on subdomain, then when it is transferred to the main domain, the operability of all links will be maintained.

In addition, addresses of this kind are used in the file robots.txt. Therefore, it is very convenient to use a common register of relative links to the pages of the site for skipping and filling out service files.

пример где используются относительные ссылки