I'm trying to improve SEO on a platform I'm working with, and was advised to add rel="next"
and rel="prev"
links to my pages to make it clearer to google which URLS are paginated.
My question to you is, does google look anywhere except the head
element for them?
Can I add them to the next-page buttons themselves? Will that still work?
EG:
<a href='page.php?p=2' rel="next">
<a href='page.php?p=3' rel="next">
Or can I add them as a link
element, but any random place on the page outside the head?
EG:
<link rel="prev" href="page.php?p=2">
<link rel="next" href="page.php?p=3">
Or does that type of link explicitly require it to be present in the head
and only in the head
?
According to Google WebMaster Central it's not required to be outside of the head, but that seems kind of ambiguous to me.
rel=”next” and rel=”prev” only need to be declared within the section, not within the document .
Does anyone happen to know what the specifics of that tag are and whether it'll index it properly if I put the link tags outside the head element?
(for anyone wondering why on earth I don't just put the rel tag in the head, it's because it needs to be dynamic and I couldn't find a way to dynamically insert php into the head element with our platform)