rel="next" & rel="prev" for paginated archives
Google is once again showing why standards compliant building might be very beneficial for SEO. They have started to use rel="next"
and rel="prev"
, both part of HTML4 and HTML5, to recognize archives and paged articles.
Google recently announced that it isn’t using rel=next/prev anymore. Our advice hasn’t changed, though. Yoast SEO will still take care of all pagination automatically as other search engines still use it to discover content.
A few years back, I was having a discussion with Nathan Rice, one of the developers of Genesis over how one should deal with paginated archives, eg. page 2 of my SEO category. In Genesis, there is the option to canonicalize the subpages back to the first page of an archive. I have said and will keep saying that I think that that’s the sole big SEO mistake in that theme.
Enter rel=”next” and rel=”prev”
Now, as it goes with these things, Google has just posted the solution. They’ve asked to add rel="next"
and rel="prev"
to paginated archives, so that they can distinguish them as a series and, quote:
Send users to the most relevant page/URL—typically the first page of the series.
Bingo! That’s what we want. The syntax is very simple. On https://yoast.com/cat/seo/page/2/
we should have a prev link pointing to the first page in the series and a next link pointing to the next page in the series, like so:
[code lang="html"] <link rel="prev" href="https://yoast.com/cat/seo/" /> <link rel="next" href="https://yoast.com/cat/seo/page/3/" /> [/code]
Now I think this should be added to WordPress core, but of course, it currently isn’t. We have some other related links in core right now, most of which are useless. In fact – with the exception of rel="prev"
and rel="next"
– they’ll be removed from core anyway. I’m working on a patch for that combined with the ticket to add this to core. I’ll probably need to combine that with the work Nathan and I were doing on canonical on another ticket.
Already in Yoast SEO
For now though, I’ve added this functionality to my Yoast SEO WordPress plugin, so all you have to do is update to the latest version and you’ll be taken care of!
Read more: Why every website needs Yoast SEO »
Coming up next!
-
Event
Wordcamp Asia 2025
February 20 - 22, 2025 Team Yoast is at Attending, Sponsoring, Yoast Booth Wordcamp Asia 2025! Click through to see who will be there, what we will do, and more! See where you can find us next » -
SEO webinar
Webinar: How to start with SEO (January 16, 2025)
16 January 2025 Learn how to start your SEO journey the right way with our free webinar. Get practical tips and answers to all your questions in the live Q&A! All Yoast SEO webinars »