Real fixes from seven live sites. No pitch.Log in / My reports
Idea to Traffic Pressure Test

Google Deindexed Your Programmatic Pages: Noindex, 410 or Robots.txt?

Sort your URL patterns into keep, hide and remove. Noindex the pages you want to hide and return a 404 or 410 for the ones you remove, keep both crawlable until Google drops them, and only then block the hidden patterns in robots.txt, because a robots.txt block stops Google from seeing the noindex or the 410.

Programmatic pages are the fastest way to grow a site from 20 URLs to 20,000. A template plus a dataset gives you a page for every city, every product pairing or every "X vs Y" matchup. For a while Google may index a lot of them. Then one week the Page indexing report in Search Console shows the indexed count falling off a cliff, and the "Discovered, currently not indexed" line climbs into the millions. This guide is for that moment. It explains what the drop usually means, which of the three tools (noindex, a 404 or 410 status, or a robots.txt block) fits which group of pages, and the order to use them in so you do not make things worse.

What a sudden index drop usually means

When Google removes a large share of a programmatic site from its index, it is rarely a manual penalty. Check Security & Manual actions > Manual actions in Search Console first. If it says "No issues detected", you are dealing with an algorithmic judgment: Google crawled enough of your template pages to decide most of them add little beyond what other pages, on your site or elsewhere, already say.

The numbers in the Page indexing report tell you where the problem sits:

  • Discovered, currently not indexed in the hundreds of thousands or millions means Google knows the URLs exist but has chosen not to spend crawl time on them. Your site is producing far more URLs than Google thinks are worth fetching.
  • Crawled, currently not indexed means Google fetched the page, read it, and passed. This is a quality signal about the template itself.
  • Duplicate without user-selected canonical means near-identical pages with no canonical tag telling Google which one you prefer.

A recent example on r/webdev showed all three at once: a directory site went from roughly 650,000 indexed pages to about 71,700, with over 11 million URLs sitting in Discovered, currently not indexed. That ratio, more than 100 discovered URLs for every indexed one, is the real problem. Google is not going to index millions of pages from a site that has not earned that much trust, and every useless URL it finds makes the useful ones harder to reach.

Google's own crawl budget guide says the topic mostly matters for sites with over 1 million unique pages that change weekly, sites with 10,000 or more pages that change daily, and sites where a large portion of URLs show as Discovered, currently not indexed. If your site fits the last description, even at 5,000 pages, the advice below applies to you.

Sort your URLs into three groups first

Before you touch anything, export your URL patterns and put each one into one of three buckets. Use Search Console's Performance report, filtered to the last 16 months, to see which page patterns have ever earned clicks.

  1. Keep and improve. Patterns that earned clicks or impressions, or that answer a search people actually make. For a directory, that is usually the main listing pages and the most popular comparisons. These stay indexable and get better content: real data, unique notes, something a visitor could not get from the parent page.
  2. Keep for users, hide from search. Pages that are useful once someone is on your site but should never be a search landing page. Filter combinations, sort orders, low-demand pairings. These stay live but should not be indexed or crawled.
  3. Remove. Pages with no users and no search demand. Thin auto-generated combinations nobody asked for. These should stop existing.

Be honest with the third group. On most programmatic sites it is the largest by far. A useful rule: if a pattern has fewer than 10 impressions in 16 months across all its URLs, nobody is searching for it.

Noindex, 410 or robots.txt: which tool for which group

The three tools do different jobs, and mixing them up is the most common mistake in a cleanup.

noindex tells Google not to show a page in results. Google has to crawl the page to see the tag, so noindex does nothing for crawl load. It is right for group 2 pages that were already indexed and need to drop out.

404 or 410 tells Google the page is gone. Google has said the practical difference between the two is minimal; a 410 can be processed slightly faster, but both lead to removal. Use either for group 3. Google also needs to crawl these to see the status code.

robots.txt Disallow stops Google from crawling a URL pattern at all. That is the only one of the three that saves crawl time, and Google's faceted navigation guide recommends it for filter URLs you never want indexed. The catch: Google's noindex documentation states that for noindex to work, the page must not be blocked by robots.txt. If you block a URL that is already indexed, Google can no longer see the noindex or the 410, and the URL may stay in the index as "Indexed, though blocked by robots.txt".

So the order matters:

  1. Add noindex to group 2 and return 410 for group 3. Leave both crawlable.
  2. Remove internal links to both groups from your templates, nav, related-links blocks and XML sitemaps, so Google stops discovering new ones.
  3. Wait until the Page indexing report shows those patterns moving to "Excluded by noindex tag" or "Not found (404)". On a large site this often takes 4 to 12 weeks.
  4. Only then add robots.txt Disallow rules for the group 2 patterns to stop the crawling for good.

New URL patterns that were never indexed can go straight into robots.txt, since there is nothing to remove.

Doing it on Cloudflare Pages

On a static site hosted on Cloudflare Pages you can set a noindex header for a whole folder with the _headers file in your build output, without editing every page:

/compare/*
  X-Robots-Tag: noindex
/filter/*
  X-Robots-Tag: noindex

Deleted pages return 404 automatically once the file is gone from your build. If you want a 410 instead, a small Pages Function at functions/routes/[[path]].js can return it for a removed folder:

export function onRequest() {
  return new Response("Gone", { status: 410 });
}

Check that each pattern now sends what you expect before you wait on Google:

curl -sI https://example.com/compare/a-vs-b | grep -iE "^HTTP|x-robots-tag"
curl -sI https://example.com/routes/old-page | head -1

The first should show x-robots-tag: noindex and the second HTTP/2 410. Then use the URL Inspection tool on one example of each pattern and click Test live URL to confirm Google sees the same thing.

Failed validations and how long recovery takes

Many site owners panic when Search Console shows "Validation failed" on groups like Excluded by noindex tag. Validation is only for issues you have fixed. If a page is noindexed on purpose, there is nothing to validate, and a failed status there does no harm. Do not click Validate fix on groups you created deliberately; it just sends Google to recrawl URLs you want it to ignore.

Recovery time depends on how much you cut and how good the remaining pages are. Pruning alone does not bring traffic back. It removes the drag so that your best pages get crawled more often. Expect the indexed count to stabilize within a few weeks of the cleanup reaching Google, and expect traffic to follow only as the kept pages get better. Plan in months, not days: Google has to recrawl the removed URLs, recrawl the kept ones, and reassess the site as a whole, and that reassessment often only shows up clearly around a later core update.

Before and after the cleanup, run your main page types through the free site checker to confirm canonicals, robots rules and status codes say what you intend. A cleanup that accidentally noindexes a money page is far worse than the bloat you started with.

Where this question came from

Questions about pruning programmatic pages

Should I block programmatic URLs in robots.txt right away?

Only if they were never indexed. For URLs that are already in the index, add noindex or a 410 first and wait until Search Console shows them excluded, because robots.txt stops Google from crawling the page and seeing those signals.

Is a 410 better than a 404 for deleted pages?

Google has said the difference is minimal. A 410 may be processed slightly faster, but both lead to removal from the index. Pick whichever is easier on your host.

Do I need to fix a failed validation on the Excluded by noindex tag group?

No. Validation is for issues you have fixed. If the pages are noindexed on purpose, ignore the failed status and do not start a new validation.

Will pruning thin programmatic pages bring my traffic back?

Not on its own. Pruning lets Google spend more crawl time on your better pages. Traffic returns as those kept pages are improved with original data and earn their place, which often takes two to three months.