Home Forums WoodMart support forum how to no-index ,add-to-card related page and shop_row related page

how to no-index ,add-to-card related page and shop_row related page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #662940

    vapeliondubai
    Participant

    https://abc.com/product/add-to-card=4
    https://abc.com/product/?shop_row=4

    These related URLs are getting indexed in Google, which is affecting my original page versions. I’m using Rank Math SEO plugin and have already created no-index settings through Rank Math (Titles & Meta > Misc Pages), but these related pages are still being indexed and crawled by Google.
    To do no-index ‘add-to-cart’ related pages, I added code to my functions.php file to implement no-index for those URLs. After implementing this code, I can see it’s working properly. However, I still cannot find any option to apply no-index to pages with ‘shop_row=4’ parameters.
    How can I prevent these ‘shop_row=4’ related pages from being indexed by Google?”

    i submit code for add-to-card realated page do no-index in fuctions.php file { this code is work poperly )
    do you want to see this code?
    LooK this code:

    add_filter( ‘rank_math/frontend/robots’, function( $robots ) {
    $url = home_url( $_SERVER[‘REQUEST_URI’] );
    if( (strpos($url,’?add-to-cart=’) !== false) ) {
    $robots[‘index’] = ‘noindex’;
    $robots[‘follow’] = ‘nofollow’;
    }
    return $robots;
    });

    Now i want to no-index for “https://abc.com/product/?shop_row=4” related page

    #663092

    vapeliondubai
    Participant

    hellow

    #663186

    Luke Nielsen
    Keymaster

    Hello,

    In Theme Settings, we do not have such options for disabling indexing. Such settings should be related to the SEO plugins.

    In general, you can try to create a similar custom and try to put another link – https://prnt.sc/TUoKli6OHGpE , if it doesn’t help you, contact the SEO plugin support and ask them how to disable indexing for a specific URL.

    Kind Regards

Viewing 3 posts - 1 through 3 (of 3 total)