• Resolved CB

    (@cbrandt)


    Hi, folks,

    My real estate website has custom filters and a search feature that result in thousands of pages with either duplicate or thin content. I want to “noindex, follow” them.

    From Yoast’s KB page on the topic, I quote:

    By default, search pages and 404 pages will be set to noindex, follow.

    However, it appears that this only applies to regular WordPress search result pages, not to custom search result pages.

    How can I go about it? What should I do in my theme PHPs that would allow for Yoast to also include “noindex, follow” metatags on those pages?

    I had tried to exclude them via Robots.txt, and Google initially complied. But now I see several of these pages creeping back up in my GSC reports, and I’m afraid they may hurt my rankings.

    Thanks,
    CB

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Please feel free to refer to this article on how to noindex URLs — https://kb.yoast.com/kb/how-do-i-noindex-urls/

    You may also want to try checking one of the filters and see if it helps with your particular scenario for the meta robots — https://yoast.com/wordpress/plugins/seo/api/

    Thread Starter CB

    (@cbrandt)

    Hi Michael,

    Thanks for the reply.

    The First link you provided is exactly the link I quoted from in my original post ??

    The second link gives me a hint:

    wpseo_robots (string)
    Allows filtering of the meta robots output of Yoast SEO.

    Is it possible to use this wpseo_robots filter to make Yoast generate “noindex, follow” meta tags for pages it currently doesn’t?

    As I quoted in my OP, I know that Yoast by default generates search-result pages with a “noindex, follow” robots meta tag. This is working on my websites, but only for regular WordPress/blog search results.

    Mine is a real estate website. So it has as an important component a search feature that will let users pick their choice of things like: property location, property size, property price, how many bedrooms, etc. The thousands of pages generated by this search feature when Googlebot crawls my website are currently being generated without Yoast’s wpseo_robots default meta tag of “noindex, follow” for search-result pages.

    My intention is to make my theme flag these custom search-result pages the same way that a normal blog search is flagged, so that Yoast will pick it up and generate its default “noindex, follow” tag for every search result page, whether custom search or blog search.

    I’m not a developer, and have only a basic notion of PHP, so I need help figuring out what code should I insert (and where) to make Yoast understand that my custom search-result pages should be treated like any search-result page. I’ll then pass along any suggestions to my theme developers.

    Any ideas?

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    In order to set the noindex robots meta to your custom search page, you’ll need to use the wpseo_robots filter to do that.

    We can’t offer support on custom code (needed to change (core) features of our plugin). Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Thread Starter CB

    (@cbrandt)

    Hi Md Mazedul,

    Thanks for explaining. I perfectly understand your position.

    I hope someone else will perhaps have already gone through this issue, and will be kind and share their solution.

    Also, I have already contacted my theme’s support, perhaps they will know the solution already.

    Best regards,
    CB

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Noindex, follow for search results’ is closed to new replies.