Since I moved this blog across domains, I have been using the WordPress SEO by Yoast plugin instead of the infamous All In One SEO Pack plugin I previously used. So far I’ve been happy with it and it is pretty neat.
However, today I noticed an unfamiliar line of code when looking at the source of this page. On the homepage the Yoast plugin had created a <link rel=”next”> tag:
<link rel="next" href="http://guidovanoorschot.nl/page/2/">
I wasn’t familiar with the rel=’next’ attribute, so I found some details in the HTML specification here. Looking at the code again, I also found that the canonical URL of this page was the same as the URL:
<link rel="canonical" href="http://guidovanoorschot.nl/page/2">
At first I thought this would be a problem as Google might regard the content on this page 2, which was the same as individual posts, as a duplicate. However the plugin also added the following line: <meta name="robots" content="noindex,follow"/>, which solves that problem by not allowing Google to index that page.
Fixing the rel=”next” problem in Yoast
However, I found that for some people with different themes the rel=’next’ was zausing problems. If this is the case, you can fix the problem by commenting out one line in the plugin. Go to line 241 in wp-content/plugins/wordpress-seo/frontend/class-frontend.php and comment it out:
$this->adjacent_rel_links();
to
//$this->adjacent_rel_links();
This way the link won’t show up anymore in your homepage’s code. Do keep in mind that when upgrading the plugin you should check to make sure it doesn’t pop up again.