How to not index filter pages

#574391
  • Resolved Anonymous
    Rank Math free

    Hello
    I am facing an issue related to the filter pages
    I don’t want to index filter url or pages

    example of filter ur page
    https://www.sitename.com/shop/?filter_size=large
    blog?yith_wcan=1&query_type_color=and&filter_color=grey,blue-tiles,black,warm-grey

    I have disallowed filter url and pages in robots.txt also but unable to stop it from indexing

    Disallow: */feed
    Disallow: */product-tag
    Disallow: */search
    Disallow: *?s

    Please help me to stop these pages from indexing

Viewing 9 replies - 1 through 9 (of 9 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.

    Please note that blocking them in robots.txt can still get them indexed if their meta robots is set to index.

    In this case, you can use this filter to set those filtered pages to noindex:

    // Noindex filter queries
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    $url = home_url( $_SERVER['REQUEST_URI'] );
    if (strpos($url,'?yith_wcan=') !== false) {
    $robots['index'] = "noindex";
    $robots['follow'] = 'follow';
    };
    return $robots;
    });

    And here’s a link to how to apply this to your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Once done, clear your website’s cache and check again their robots meta tag if they are already set to noindex.

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Hello team

    I have these filters’ URLs and pages on my website and these pages come in referring URLs in GSC also I have a product schema aggregate rating issue which is also a popup in GSC. On my website my product category pages also not indexing from time to time irrespective of submitting sitemaps on weekly bases. Please let me know what causing it and how to fix it also does this affect my SEO and ranking and how to improve my ranking

    Hello,

    Please share the affected product URLs so we can check them as well.

    Regarding the indexing issue, if there are any issues reported on your URLs that prevent them from being indexed, then you should see them in the coverage section report of your GSC:
    https://support.artlogic.net/hc/en-gb/articles/360016851260-Google-Search-Console-errors-and-coverage-issues

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hello team

    I have created rank-math.php file and implemented code that you have shared but its still not showing noindex for filter pages. I have given you access please check and solve.

    Hello,

    We can see you’re currently using the Rank Math PRO plugin on your website, but the account you have used to open this ticket is the Rank Math free version.

    Can you please search and forward a receipt from FastSpring.com so we can locate your account and verify it?

    Back to the issue, we’ve updated the code on your site and now all of your filter pages are currently set to noindex. Please check the screenshot in the sensitive data section for your reference.

    Regarding the indexing issue, as my colleague mentioned above, please check your Google Search Console coverage section to determine any issues reported on your site. You can share the error message or take a screenshot using this tool and add the link here so we can check as well.

    Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hello Team

    recently I told you to remove my filter pages from indexing and you have placed no index on that pages but when I conduct an audit for my website I saw that my Product category pages are blocked from crawling and there was a “no index” tag at the head section. so I am requesting you please remove it from every page and no index only apply for filter URLs.

    https://imgur.com/a/JRh6NbP

    Hello,

    The product categories which has “noindex” tag on them because you don’t have any product assigned to them. We have a NoIndex tag added to them so Google does not penalize your website with thin content pages.

    As soon as you assign any product to those categories, those categories will add an Index meta tag to it.

    If you want to turn off that feature, which we do not recommend, then please follow this video screencast:
    https://i.rankmath.com/WKPyMy

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    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.

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

The ticket ‘How to not index filter pages’ is closed to new replies.