📜 ⬆️ ⬇️

Page layout rel = "next | prev"

Along with the use of the rel = “canonical” attribute to indicate to the search bot to duplicate content, it is now possible to use the value rel = “next” and rel = “prev” for HTML links to indicate the position of the current page in relation to neighboring pages within the navigation block. Within the web, there are various options for using page-by-page navigation - an article divided into several pages, or a category of products distributed over several pages, or a forum thread divided into a sequence of URLs. Now, by including rel = “next” and rel = “prev” in the layout of pages, we can specify Google:

There is an exception when using rel = “next | prev” if you have implemented the “Show all” page, on which, for example, all products of the category are shown without pagination. In that case, please read these recommendations .

Due to the fact that the “Show All” page is most often preferred by users, we are doing everything possible so that it’s the search results that participate, rather than individual pages (marked up using rel = “next | prev”). If there is no such page in the structure of your site, you can safely use the rel attribute as described above.

Your actions

Here are three options:
  1. Let it be as it is. Multi-page content is found all over the Internet, and Google will continue to make every effort to find the best result for the user, regardless of whether you use the rel attribute or not.
  2. If you have a “Show All” page, take a look at our recommendations .
  3. Specify the rel attribute for Google. This will help the system more accurately index your content and show users the most relevant pages. Implementation details below.

Using rel = “next | prev”

If you prefer the latter option, let's get started! Suppose you have content and it is presented as follows:
www.example.com/article?story=abc&page=1
www.example.com/article?story=abc&page=2
www.example.com/article?story=abc&page=3
www.example.com/article?story=abc&page=4
')
On the first page, www.example.com/article?story=abc&page=1 , you need to include in the following block:
<link rel="next" href="http://www.example.com/article?story=abc&page=2" /> 

On the second page, www.example.com/article?story=abc&page=2 :
 <link rel="prev" href="http://www.example.com/article?story=abc&page=1" /> <link rel="next" href="http://www.example.com/article?story=abc&page=3" /> 

On the third page, www.example.com/article?story=abc&page=3 :
 <link rel="prev" href="http://www.example.com/article?story=abc&page=2" /> <link rel="next" href="http://www.example.com/article?story=abc&page=4" /> 

And on the last page, www.example.com/article?story=abc&page=4 :
 <link rel="prev" href="http://www.example.com/article?story=abc&page=3" /> 


A few notes:

Good layout and interesting projects!

Source: https://habr.com/ru/post/128746/


All Articles