Hello,
Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.
Since those pages are already indexed, you may use the following filter to set noindex
to those URLs with ?taxonomy=product_shipping_class
query parameters:
add_filter( 'rank_math/frontend/robots', function( $robots ) {
$url = home_url( $_SERVER['REQUEST_URI'] );
if( (strpos($url,"?taxonomy=product_shipping_class") !== false) ) {
$robots["index"] = 'noindex';
$robots["follow"] = 'nofollow';
}
return $robots;
});
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Google should remove those URLs after the next few crawls.
Let us know how it goes. Looking forward to helping you.
Thank you.
This link has not been removed from the Google listing It has reappeared I have added the code you provided to function.php
https://drive.google.com/file/d/1fi56kbPZ8QrwDx6HdY9_nnxpGDbMCe0D/view?usp=drivesdk
Hello,
I’ve checked those links on the search results, but unable to find them on your site.
In this case, you may need to give Google some time to recrawl your site and update those links on the search results page. Unfortunately, there’s no definite time for Google to recrawl your site.
According to Google guidelines, crawling can take anywhere from a few days to a few weeks. The crawling and indexing of the website depend on the authority and crawl budget of the website.
Also, it is not possible to control which links show on the search results under the Sitelinks as Google chooses them automatically. Since they are already removed or set to noindex, you may need to give Google some time to recrawl your site.
Hope that helps.
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.