Should I be noindexing or fully blocking search result pages from my robots.txt?

nancybruno commented: Yeah, this is right.Robots.txt is a file in which you can add the pages that you don't want to show search engine bots. +0

Dani AI

Generated

Short answer: if the goal is “keep internal search pages out of Google,” use a robots meta noindex (or an X‑Robots‑Tag header) and let Googlebot fetch the page so it can see that directive. Robots.txt is useful when your priority is to stop crawlers from exploring huge or infinite parameter spaces (and thereby preserve crawl budget), but it does not reliably remove URLs from Google’s index by itself. (developers.google.com)

A few practical rules that reconcile the replies above (and that address points from , and ): if a search-results URL is actually a useful, curated page (think category page or a landing you want found), allow crawling and index it. If the page is auto-generated, low value, or often returns zero results, mark it noindex (and use follow if you want link discovery to continue). If you’re managing a very large site with “infinite” URL combinations, use robots.txt to stop crawlers from wasting cycles on that space — but beware that disallowing alone can still lead to “indexed, though blocked by robots.txt” entries. (seroundtable.com)

Implementation notes:

  • To remove a page from the index, add a meta tag the crawler can read, for example:
  <meta name="robots" content="noindex,follow">

or set an X‑Robots‑Tag: noindex header for non-HTML resources. Do not put noindex in robots.txt — Google doesn’t support that. (developers.google.com)

Quick troubleshooting checklist: pick the approach, deploy it to a few test pages, then validate with the URL Inspection and Page Indexing reports in Search Console. If you see “Indexed, though blocked by robots.txt,” remove the disallow for those URLs and apply noindex (or return 404/410 or password‑protect them) to remove them from search results permanently. For large sites, block infinite spaces via robots.txt but still remove any already‑indexed URLs with noindex/removal or proper status codes. ()

In short: robots.txt = good for cutting crawl waste; meta noindex (or proper HTTP status) = the reliable way to keep search result pages out of Google.

Yeah, this is right. Robots.txt is a file in which you can add the pages that you don't want to show search engine bots. We can also block a website by adding noindex tag in the website.

Thanks but that doesn’t answer my question. How do I handle the website’s internal search result pages?

I've never written a site with such result pages but I'll still take a chance and try to offer something.

If the result page exists as a template page that is filled in with the result, then I think noindexing that page would do it.

If the result page is completely created on the fly, then I don't thing there is an issue because there isn't anything for the robot to find unless it does a search itself and I don't think that happens.

I may be way off the mark here but I figured I'd take a shot at it anyway. Hope I haven't wasted too much of your time.

That you for your suggestion.

My question isn't whether to noindex or do nothing.

Google has already made it clear that it isn't a good user experience for their searchers to land on your search result pages, so your search result pages should not be in Google. My question is whether they should be blocked with a meta noindex tag or if they should be blocked via robots.txt.

I've done some research and concluded that robots.txt offers advantages here.

For those who may be curious, the reasoning is that it saves crawl budget by not having Google crawl around infinite spaces, as search results have arbitrary query strings for the terms being searched for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.