Skip to main content

Digital Marketing

How To Implement Rel Prev Next Tags

Full Transcript

Hey everyone, today I’m going to explain how to implement Rel Prev Next tags. They’re the ones that tell Google about paginated sequences of pages on your site. For example, if you have 100 products in one category, and you want to show only 10 per page, you end up having to create 10 pages of products to show them all. This is quite common on eCommerce sites.

So, why do I need Rel Prev Next Tags?

I thought you’d never ask. The basic reason is when you have a paginated group of pages, the individual pages might be seen as poor quality pages by Google. For example, if you have 10 pages of different types of snowshoes that you are selling, from a search engine perspective, they all look kind of the same. You might have the same title tag on all 10 pages. The product descriptions are all pretty similar too.
As a result, they might be seen as poor quality, near duplicates, of each other. Using the “rel prev” and “rel next” tags helps solve that problem. Better still, the pages get treated by Google as a single entity. I.e., links to any of the pages in the sequence provide benefit to the ranking of the entire sequence for related queries. This is probably true for more subtle ranking signals, such as user engagement with the pages as well.

So, How Do the Tags Basically Get Set Up?

It’s pretty simple actually. If I’m on page one of a sequence of ten pages, I use a “rel next” tag to tell Google which page is the next in that sequence of pages.
Then on pages two through nine of the sequence of pages, I use a “rel prev” tag to point to the prior page, and a “rel prev” tag to point to the next page. The example code you are looking at now is for page five.
Finally, on page ten of our ten-page sequence, I only need a “rel prev” tag pointing back to page nine, as I’m showing here.

Now, let’s discuss how to Implement Rel Prev Next Tags, in a Nutshell.

  1. Identify the pages on which you want to place a “Rel Prev” and/or “Rel Next” tags.
  2. On page one of the sequence, place a “rel next” tag pointing to page two.
  3. On the last page of the sequence, place a “rel prev” tag pointing to the prior page.
  4. On all the other pages place “rel prev” tags pointing to the prior page, and “rel next” tags pointing to the next page.
  5. Update the source page on your live web site.

But Wait, As Always, There’s More!

Google treats these tags as a suggestion, not a directive. That means that they may see the tags on your pages, but ignore them. In general, they will only do this if you implement them incorrectly. For example, one common mistake people make is that they properly put “rel prev”, “rel next” tags on pages, but also include “rel canonical” tags on the same pages. These two tags conflict with one another, and should not be on the same page as one another. Thank you.
Rel Prev Next tags are useful when you want to tell Google about paginated sequences of pages on your site. In this episode of The Digital Marketing Classroom, Eric will explain not only how to implement these tags, but why and when.

Thoughts on “How To Implement Rel Prev Next Tags”

  1. Great presentation Mark and I’ve always used the same set-up.
    However, most of the large eCommerce stores I’ve checked only have a canonical link and don’t actually bother to implement the rel=prev and rel=next tags within pagination. ASOS for example.
    I know the real benefit of having these tags is to help Google understand the pagination sequence and prioritise page 1 in search results. However, for eCommerce stores that receive links to page 2,3 etc., they’ll want to ensure the full link value gets credited back to page 1 of the category, or a ‘view all’ category, right?
    What’s your views on this?

  2. Hi Joshua – actually, in principle, when you use prev/next tags, the full value of links to any of the pages in the paginated sequence should still accrue to the main page, or view all page. In fact, they really accrue to the entire set of pages as a group. That’s an important concept about the prev/next tags. You can read thhe discussion I had with Gary Illes here:

  3. Hi Eric,
    Curios on your thoughts if adding “noindex,follow” on page 2 and beyond will help or hurt the pagination and indexation based on the rel prev/next technique?

  4. Hi Dario – you specifically DON’T want to put the NoIndex tag on the page, as it’s a conflicting instruction with the Prev/Next tag. Since the NoIndex tag is a directive and Prev/Next is only a suggestion, the most likely outcome is that Google will NoIndex page, in which case the Prev/next tags become useless.

  5. Thanks Eric. Seems there’s a few ways to approach pagination. I see that your blog doesn’t use the prev/next tags (page 2, etc), but rather a canonical tag to your main blog page. Yoast recommends noindex on page 2+ with prev/next using WordPress. I’ll have to test turning it off and on to see how it affects our site.
    If you have a case where noindex specifically hurt the site with prev/next, I would love to hear about it. Otherwise, I don’t really see a disadvantage to using nonindex along with prev/next, since one is a directive and the other a suggestions as you mention.
    Seems like using noindex that we’re telling Google, “here’s the paginated series, but in case you don’t pick it up, please don’t index page 2 and beyond”. Am I missing something?
    With the way your blog pagination is setup, I definitely agree not to use noindex. Thanks again for your response!

  6. Hi Daris, I think the main point I’m making is that when a NoIndex tag has been implemented, the prev/next will ALWAYS be ignored so why use it? The prev/net is just a waste of time when the NoIndex is on the page.

  7. Two quick reasons I can think to use noindex are: better crawl budget and help with any possible Panda issue. Seems that Google would pick up on the prev/next tags but not take the time to index the content or count it against dup title/desc tags, etc.
    Avvo uses “noindex” with pagination, and so do millions of WordPress sites using Yoast.
    Our team works with many large clients with 100K uniques and much higher. I’ll test the variations and maybe write a case study. Thanks again for your input!

  8. Hi,
    I also came across with this problem, in my site there are hundreds of subpages, I’m using yoast and so far is set to noindex subpages of archives.
    I’m indexing the tags taxonomy and by viewing the page source, I see the rel=”next” and rel=”prev” set correctly as suggest google. But I don’t see it on all pages including the home page, (I use a static home page).
    I tried different codes, two of them only shows rel=”prev” but not the rel=”next”.
    I took this codes from here:
    I’m quite confused, why yoast suggest to noindex subpages of archives when is using rel next/prev?
    Dario did you find any solution?

  9. Hi David – Yoast is an excellent plugin overall, but we actually use a different one on our site. My guess is that the Yoast plugin somehow missed the fact that the prev/next tags are on your pages, and therefore recommended a NoIndex tag. But, since you have prev/next on those pages, I’d urge you to NOT implement the NoInedx tags.

  10. What if I have like 200 products on an eCommerce site but 3 different display option (show 20, 40, and 100 products per page).
    As default I have 20 products per page so I end up with 10 pages. I mark them with next prev tags, but if the user selects 100 products per page, the pages from 3 to 10 are empty.
    What kind of markup you recommend for this case?

  11. When they pick the 100 page view, don’t render the empty pages. In your example, you should only show two pages, and use rel next on page one to point to page 2, and prel prev on page two to point to page 1.

  12. Hi Jarda, thanks for your question. As Maile notes, there is no point to the Prev/Next if the NoIndex tag is here. I.e., why do you care to tell Google that a group of pages is a paginated sequence, when you’re also telling them to not keep the pages in the index? So Maile may not think of this as a conflict, but publishers who put both tags on a pageare wasting their time with the prev/next tags, which is why I still think of it as a conflict.

  13. Hi Eric, I Am getting your tutorials and they seems useful. I am new to the web development and currently in learning phase as i am a student. I am developing an eCommerce website regarding rental cars. i have to implement pagination in my website.i tried using different methods such as: with Jquery and AJAX but they do not produce the desired results.
    The technique you specified is what actually I want to implement because there are some eCommerce websites out there which uses the same technique. But the problem is, as i specified I’m noob and currently in learning phase, I really do not know how to implement this in my website.
    Let me tell you the point in your tutorial where I’m totally blank. you said
    “If I’m on page one of a sequence of ten pages, I use a “rel next” tag to tell Google which page is the next in that sequence of pages ”
    and then you specified “Then on pages two through nine of the sequence of pages, I use a “rel prev” tag to point to the prior page, and a “rel next” tag to point to the next page”
    and after that “Finally, on page ten of our ten page sequence, I only need a “rel prev” tag pointing back to page nine”.
    The confusion is, I have one page lets say “index.php” where all the products are being displayed, say there are 100 products. Now, i want to implement pagination and 10 products per page. What i think, I don’t need to make 10 physical pages lets say page1.php page2.php to page10.php because the products could increased from 100 to 1000. Then how would i be able to make more physical pages when my website is live.
    Now, if there is no need to create 10 physical pages, then what do you actually mean by the statements which i have mentioned above ? i mean where should we put the rel = next and rel = prev tag if we have only one page lets say “index.php”. should we place them together ?

  14. Hi Mehran – you don’t NEED to create multiple pages, but if you CHOOSE to break your products into multiple pages, you should then use prev/next tags on them. So, if you choose to implement only 6 pages, then you should use the next tag on page 1, prev and next tags on pages 2 to 5, and prev tags only on page 6. If you have only one page, you don’t need to implement prev/next tags at all. Hope that helps!

  15. Can i have a demo source code or something which actually get the products from database and have prev/next to move from page to page. That’s okay if the source code is not available, only structure will work too if you provide me a demo page which contain prev/next. It will help me understand better.
    Would be greatly appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mark Traphagen

Mark Traphagen was our Content Strategy Director for Perficient Digital until February of 2019. He has been named one of the most influential content and social media authors in numerous industry listings.

More from this Author

Follow Us