Hello,
Thank you for contacting support.
We can see that the meta robot of the concerned URL is actually set to index
; however, the canonical URL is set to the main page.
Rank Math by default sets such parameterized URLs canonical to the main page to avoid duplicate and thin content issues for the users.
You can, however, try adding the following filter to your website in order to force Rank Math to set self-referencing canonical for all of your URLs:
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
$current_url= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
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.
Hello Ike,
thank you for your answer and the code. I’ve inserted it and will now observe if the canonical links will be indexed.
Best regards
Hello,
We are glad to know that this issue has been resolved. Thank you for letting us know.
This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.
We appreciate your patience and cooperation throughout this process.
Thank you for choosing Rank Math.