In search engine optimization, category optimization and pagination can get complicated. There are just a lot of options. You can rel canonical all your pagination to one main page, you can no index all the paginated pages and follow the links, you can do nothing and hope Google gets it right, you can create view all pages, you can make custom templates, you can enable a facet pagination that does not change the URLs or you can do rel next rel prev.
The method you choose depends on the quality of the content and your site structure philosophies. I am not going to get into all of the subtleties now (but you can read about them here if you like). But what I am going to do, is discuss a very small and important part of the rel next rel prev optimization for SEO that a lot of people miss.
Our team (credit to Amanda) came across a technical error with rel next rel prev this week on a website that is worth sharing. A website had relative URLs in their rel next rel prev optimization, but the URLs were serving 404 errors. But why?
Basically, it is important to note that if you use relative links for rel next rel prev, you need to make sure you get your <base> URL right. The <base> URL is very important for rel next rel prev pagination.
Google States, “rel=”next” and rel=”prev” values can be either relative or absolute URLs (as allowed by the tag). And, if you include a <base> link in your document, relative paths will resolve according to the base URL.“
This is a very important point to keep in mind if you are using relative links in your rel net rel prev. What this means is, if the URL of your page is:
Best SEO Company, #1 SEO Services, Top Firm In USA (Trusted Agency)
And if you have <base> link in your document such as
<base href=”https://ignitevisibility.com/services/seo/3″>
And your relative links in your rel next rel prev pagination are:
<link rel=”prev” href=”/services/seo/2″ />
<link rel=”next” href=”/services/seo/4″ />
Google will actually see those URLs in the rel next rel prev as being
<link rel=”prev” href=”https://ignitevisibility.com/services/seo/3/services/seo/2” />
<link rel=”next” href=”https://ignitevisibility.com/services/seo/3/services/seo/4” />
As you can see, this is a technical error that could causes major issues with your pagination (lots of 404 errors in the URLs). Instead, you need to make sure your <base> link matches up with your relative URLs. So if you were going to have a base, it should look like this.
<base href=”https://ignitevisibility.com”>
And your relative links in your rel next rel prev pagination should be:
<link rel=”prev” href=”/services/seo/2″ />
<link rel=”next” href=”/services/seo/4″ />
This will result in Google seeing the correct pagination.
Google will see those URLs as being
<link rel=”prev” href=”https://ignitevisibility.com/services/seo/2″ />
<link rel=”next” href=”https://ignitevisibility.com/services/seo/4″ />
Make sure to keep this in mind next time you are using relative URLs for rel next rel prev.