[ad_1]
Hello @thegulshankumar,
Thank you for contacting Rank Math support.
Rank Math adds a self-referencing canonical URL by default for your paginated pages if they are set to index.
However, if it is not working on your site, then you can try the following filter to force the self-referencing canonical URL of your blog pagination:add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
global $wp;
$current_slug = home_url( $wp->request );
if ( is_paged()) {
$canonical = $current_slug . '/';
}
return $canonical;
});
And here’s a guide on how you can add a filter to your website:
https://rankmath.com/kb/filters-hooks-api-developer/
Hope that helps.
