Hello,
I understand the issue you are facing with canonical links and pagination. To ensure that each pagination subpage points to its corresponding page correctly in the canonical links, you can follow these steps:
- Choose a Different Canonical URL: You can set up different canonical URLs for each pagination subpage using Rank Math. Here’s how you can do it:
- Go to the Advanced tab in the Rank Math meta box for the page.
- In the Canonical URL field, enter the URL of the specific page you want Google to index.
- Save your changes.
- Add a 301 Redirect: Another method is to add a 301 redirect from each pagination subpage to its corresponding page. This will inform Google that each subpage is a separate entity. Here’s how you can do it:
- Navigate to Rank Math > Redirections in your WordPress admin dashboard.
- Create a 301 redirect by entering the URL of the pagination subpage as the Source URL and the corresponding page URL as the Destination URL.
- Click the Add Redirection button.
By following these steps, you can ensure that each pagination subpage correctly points to its respective page in the canonical links. If you have any further questions or need assistance, feel free to reach out to our support team here.
I hope this helps resolve the issue you are experiencing with canonical links and pagination. Let me know if you need further assistance.
Sources:
How to Fix “Duplicate, Google Chose Different Canonical than User” » Rank Math
Advanced Tab in Rank Math SEO’s Meta Box
Setting Canonical URLs in Rank Math » Rank Math
Alternate Page with Proper Canonical Tag Status in Google Search Console » Rank Math
Hello,
thanks for answer. My problem is that I can’t edit the pagination subpages; I can only edit the category. I don’t have any place where I could paste the subpage address to set pagination on it. The window visible in the screenshot is meant for setting the canonical, but it will set it on the category subpage, not on, for example, /page2, /page3, etc.
Hello,
Thank you for contacting Rank Math support.
Please use the following filter to set the self-referencing canonical of the paginated pages:
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
if( is_paged() ) {
$current_url="https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
return $current_url;
}
return $canonical;
});
Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Thank you very much. Problem solved.
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.