Inicio > Digital Marketing Dictionary > SEO > Next and prev link elements

Published on 01/19/2016

·

Updated on 12/10/2019

Next and prev link elements

Fani Sánchez

SEO Consultant

What are the next and prev link elements?

The next and prev link elements are a markup suggestion for paging content that Google launched in December 2011. This markup takes the form of links and siven elements so that the search engine can distinguish which pages belong to the same series and their order.

As many other measures advised by Google, the next and prev link elements are recommended, but not mandatory. In addition, Google states that they act as suggestions, not absolute directives.

How should this marking be implemented?

Let’s imagine that we have an online electronics store and in the TV section we have up to 3 pages full of products. The correct way to implement the next and prev link elements in our web code would be as follows:

  • Code contained in the first page/parent page (https://mydomain.com/section/)

<link rel=”next” href=”https://mydomain.com/section/page2” />

  • Code contained in the second page or intermediate page
    (https://mydomain.com/televisions/page2/)

<link rel=”prev” href=” https://mydomain.com/televisions/” />

<link rel=”next” href=”https://mydomain.com/televisions/page3/” />

  • Code contained in the last page of the section (https://mydomain.com/televisions/page3/)

<link rel=”prev” href=” https://mydomain.com/televisions/page2/ />

As you can see, in a marking of these characteristics, logical conditions are followed:

  • The first page will only contain the rel=”next” markup element and not rel=”prev”.
  • Intermediate pages will contain double markup to indicate the previous and next page, i.e. the link elements rel=”next” and rel=”prev”.
  • The last page, on the other hand, will only contain the markup element rel=”prev” and not rel=”next”.

Next and prev and canonical link elements

The elements rel=”next” and rel=”prev” on the one hand and rel=”canonical” on the other hand are independent and complementary concepts. Both requests can be declared in the same page, for example, when we have paging that also has session variables. We cite the example provided by Google. If we have this page where ‘&page=” is the page variable and ‘&sessionid=’ is the session variable, which does not change the content and therefore would be duplicate content, we will suggest to Google with the following code that this is the second page of a series and that we want to index it without the session variable:

<link rel="canonical" href="https://www.example.com/article?story=abc&page=2”/><link rel="prev" href="https://www.example.com/article?story=abc&page=1&sessionid=123" /><link rel="next" href="https://www.example.com/article?story=abc&page=3&sessionid=123" />

Other considerations

  • Unlike other values (such as canonical), rel=”next” and rel=”prev” link elements can be relative or absolute URLs (as allowed by the <link> tag). And if a <base> link is included in the document, the relative paths will resolve to the base URL.
  • These link elements will be declared in the section <head>, not in the document <body>.
  • The use of rel=”previous” as a syntactic variant of rel=”prev” links is allowed.
  • If we choose to use the link elements in a series of pages, all pages in the series must contain them. Otherwise, Google will invalidate the entire markup system and use its own logic to understand and index or not the content.

References

Google announces next and prev pagination elements

Tu marca, visible y encontrable

Estás a un paso de dominar tu categoría online

Start now

Related terms

16 Sep 2020

302 redirection

What is a 302 redirection? A 302 redirection indicates that the content of a page has been temporarily moved...

Anastasia Kurmakaeva

Let's Talk!

Tell us more about your project and how you think we could help you. Improving your online visibility and conversion is just a click away.

Contact

+34 966 141 907
info@humanlevel.com

Our Schedule

Mondays to Thursdays from 8:00 to 18:30
Fridays from 8:00 to 15:00

    Fields marked with * are required






    In this form, we collect personal data in order to contact you and process your request in accordance with our services. The data controller is HUMAN LEVEL COMMUNICATIONS S.L.U. For more information on how we treat your data and to exercise your rights, you can consult our Privacy Policy.

    Terms acceptance and newsletter subscription