Hello @reminaizer,
Thank you for contacting the support.
Rank Math adds a self-referencing canonical URL by default, meaning if your paginated page is /page/2/, the canonical URL should be the same.
If it’s not working for you, then you may try adding the following filter to add self-referencing canonical URLs for your paginated blog pages:
add_filter( 'rank_math/frontend/canonical', function( $canonical ) { $current_url="https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if(false === strpos($current_url, '/page/') || is_single()) return $canonical; $canonical = strtok($current_url, '?'); return $canonical; });
Here is how you can add filters/hooks to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you very much. Works like a charm. 🙂
Hello @reminaizer
Glad that helped.
If it isn’t too much to ask for – would you mind leaving us a review here?
https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post
It only takes a couple of minutes but helps us tremendously.
It would mean so much to us and would go a really long way.
Thank you.