Are there differences between links
<a href="http://site.com/article-page">Статья</a> или <a href="/article-page">Статья</a> Ie how best to specify? because I call the full path in all the links, instead of how I understand the internal?
Статья или For visitors to your site there is no difference. The difference arises in the following cases: In this case, you will need to update all the links on the site. If you have static pages or content with static absolute links, the problem arises: you will need to update all the links on the entire site. This is fraught with errors, for example, if you skip any link, the navigation will break and the visitor will not find the page you need. If you generate links programmatically, for example, you have a constant "site domain" and you output it every time, rather than just copying the full address, then again there are no problems - you just need to change one link. Among other things, this approach allows you to place the site in a subfolder (links of the form Using different types of relative paths ( If this is a link to one of the pages of the site you are working on, then the second option is better. The first option is absolute, the second is relative. If you specify an absolute path, and the site, for example, moves to another domain, the link will already be inactive. And if you just specify href = "/ article-page", then everything will work I’ll add from the point of view of optimization for search engines, the first option as a full link would be better to pass a link, otherwise Squidward is right, so summarizing I would put the site variable with the protocol (" http://site.ru ") and generated the links taking into account this variable, if the site's engine allows it, of course). it all depends on where your article is located and your html file itself, if you have an article from another source then you need to write a full address ( http://site.com/article-page ), if you have it (for example, the same folder where the html file is) then you can just write the file name, (or if not in the same folder then write the address of the article referring to the position of the Html file in the system) Source: https://ru.stackoverflow.com/questions/699702/4 answers
/page will be in the root)./page , page , //domain/page ) is a method that works when changing the domain and protocol regardless of the technology used, so it is usually given preference.
All Articles