YITH WooCommerce Ajax Product Filter Canonical URLs Issue

#516409
  • Hi RankMath,

    I’m experiencing an issue on a WooCommerce site of mine using RankMath.

    My site uses YITH WooCommerce Ajax Product Filters and I have recently discovered that my search console is filled with Excluded by ‘noindex’ tag URLs with no canonical.

    With the standard WooCommerce filters, RankMath or WooCommerce sets a Canonical URL for either /shop/ or /category/ or /tag/.

    This implementation is perfect as per Googles Guidelines etc.

    YITH recommended this filter code to exclude these pages. However, this isn’t an ideal solution as it still sees these pages crawled a lot, especially in a store with a huge number of filters. No to mention it doesn’t pass Link Juice etc.


    if( ! function_exists( 'yith_wcan_robots' ) ){
    function yith_wcan_robots( $robots ){
    if( ! empty( $_GET['yith_wcan'] ) ){
    $robots['index'] = 'noindex';
    $robots['follow'] = 'nofollow';
    }
    return $robots;
    }
    add_filter( 'rank_math/frontend/robots', 'yith_wcan_robots' );
    }

    When you look at the filtered pages’ HTML source, there is no Canonical Tag set. However, <meta property=”og:url” is set to the Canonical URL.

    So my question is could the RankMath Filter to change the Canonical URL be used to set the Canonical on these pages?

    If, so could you adapt the above code to support that function?

    Thanks,
    Regan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Could you please share some of the product filtered URL/s so we can check them as well? You can add them in the sensitive data section

    Sensitive Data Section

    It is completely secure, and only our support staff has access to that section.

    Meanwhile, our plugin adds the canonical URL when the pages are set as index. There is no use of the canonical tag on the noindexed pages because Google isn’t going to index those pages anyway.

    If you set it as Noindex, the canonical tag will not be considered so there is no point in adding it to the pages.

    Looking forward to helping you.

    Thank you.

    Hi Reinelle,

    Thanks for your response.

    Ah, that makes sense, I don’t know why the plugin developer has chosen this method.

    I’ve removed the code from the plugin and the canonical URL showing. So I’ll consider this resolved.

    Thanks,
    Regan

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘YITH WooCommerce Ajax Product Filter Canonical URLs Issue’ is closed to new replies.