Hello,
Thank you for getting back to us.
With Rank Math the implementation of canonical on the paginated pages sets the canonical of the main index page on all paginated pages.
For example, the page https://yourdomain.com/blog/page/2
would have a canonical of https://yourdomain.com/blog
. This is the recommended way of canonical implementation in paginated pages as Google sees them as the same page as the main page.
However, if you wish to change this, you can customize the following filter to use the current URL as the canonical:
/**
* Allow changing of the canonical URL.
*
* @param string $canonical The canonical URL.
*/
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
return $canonical;
});
Hope that helps you. Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.