• Resolved Mostafa

    (@mostafasayyedi)


    Hi.

    How Can no index category page built with Elementor?

    in Default, we can no index category page in Rank Math with This URL format:

    example.com/computer/page/2

    but when we create Template for special category in Elementor URL Addresses look like this format:

    example.com/computer/?product-page=2

    and all of pages will index (with Canonical tag).

    How Can no index this pages?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @mostafasayyedi,
     
    Thank you for contacting Rank Math support.
     
    To set those template page URLs to noindex, you can use this filter on your site:
     
    add_filter( ‘rank_math/frontend/robots’, function( $robots ) { 
    $url = home_url( $_SERVER[‘REQUEST_URI’] ); 
    if( (strpos($url,’?product-page=’) !== false) ) { 
    $robots[“index”] = ‘noindex’; 
    $robots[“follow”] = ‘nofollow’; 

    return $robots; 
    });
     
    And here’s a guide to adding the code to the website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/
     
    Hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘How can No Index Category Page that built with Elementor?’ is closed to new replies.