Orofold Labs

Launching soon

Notes Get in touch

Search 4 min read Updated

robots.txt and noindex are different controls

In short

robots.txt decides which URLs crawlers may fetch, while noindex decides whether a fetched page may appear in search results.

Robots.txt and the noindex rule are often confused, although they act at different stages. One controls what a crawler may fetch, and the other controls what may appear in results. If you want a page out of results, use noindex. Blocking the page in robots.txt works against that goal.

Crawling and indexing are different

Search engines work in two steps. First they crawl a URL, which means requesting its content, and then they index that content, which means storing it so the page can appear in results. A control that works at one step does not automatically work at the other.

The robots.txt file tells crawlers which URLs they may access on your site. Google describes its main purpose as managing crawler traffic. It is not a way to hide a page from search, and a URL blocked by robots.txt can still appear in results, as the documentation warns.

The noindex rule works at the indexing step. You place a robots meta tag with the noindex value in the head of the page, or send an X-Robots-Tag HTTP header with that value. If you want to keep a page out of Google, block indexing with noindex, or password-protect the page.

Why blocking a page breaks noindex

The noindex rule works only when the crawler can read it. Google’s guidance on blocking indexing says the page must not be blocked by robots.txt and must otherwise be reachable by the crawler. If the crawler cannot reach the page, it never sees the noindex rule, so the instruction has no effect.

The same problem appears when rules are stacked. Google notes that combining several crawling and indexing rules can make some rules counteract others. Keep one clear instruction for each page, and check the page after each change.

Comparing the two controls

The table shows the main differences. Use it to decide which control matches your goal.

Questionrobots.txtnoindex
What does it control?Which URLs crawlers may requestWhether an indexed page may appear in results
Where is it set?In a robots.txt file at the root of the siteIn a robots meta tag or an X-Robots-Tag header
Does it remove a page from results?NoYes, but only after Google crawls the page again
Typical useManaging crawler trafficKeeping a public page out of results

The timing matters. Google’s guidance says that removal depends on when Googlebot last crawled the page, and for some pages a revisit can take months. Plan for a delay, and do not expect results to change on the day you publish a rule.

Working on something similar in your own product? A few honest sentences are enough – we read every enquiry and reply by email. Apply with your idea

A blocked staging site is not a hidden one

Staging copies of a site are a frequent source of mistakes. A team may block a staging site in robots.txt and assume that it is hidden. A blocked URL can still appear in results, so that assumption is wrong. Protect staging with a password or another access control, and use noindex where a page must stay public but unindexed. The guidance on staging environments covers access and data.

The robots exclusion standard states that it is not a substitute for content security measures. Anything that must stay private needs authentication, not a text file that asks crawlers to stay away.

Common mistakes to check

  • Blocking a page in robots.txt and adding noindex to it, so the crawler never sees the noindex rule.
  • Using robots.txt to hide a private page or a file that should not be public.
  • Adding noindex to a page you want people to find, or leaving it in place after launch.
  • Assuming that a blocked page has left the index, when its URL may still be listed.
  • Blocking a whole site during a build or launch and forgetting to remove the rule afterwards.

A checklist before you publish a rule

Work through these steps when you decide how to keep a page out of search results:

  1. Decide whether the page must be hidden from everyone. If it must, use password protection or another access control.
  2. If the page may be public but should not be indexed, allow crawling and add a noindex rule.
  3. Check that robots.txt does not block that page, so that the crawler can read the noindex rule.
  4. Use robots.txt only for crawl management, such as limiting requests to large areas of the site.
  5. After publishing, check the page source or response headers and record the date. Results may take time to change, so check again later.

For the wider question of which address should be the main one, read about canonical URLs and how they relate to duplicate pages.

Common questions

Can a robots.txt block remove a page from Google?
Not on its own. Google’s guidance says robots.txt is not a way to keep a page out of Google, and a blocked URL can still appear in results.
Why does my noindex tag seem to be ignored?
The crawler has to fetch the page to read the noindex rule. If robots.txt blocks the page, the instruction is never seen.
How long does a noindex page take to leave results?
Google’s guidance says the time depends on when Googlebot last crawled the page, and for some pages a revisit can take months. Expect a delay after you add the rule.

Sources

  1. Robots.txt Introduction and Guide, Google Search Central. Accessed 24 November 2026
  2. Block Search Indexing with noindex, Google Search Central. Accessed 24 November 2026
  3. RFC 9309: Robots Exclusion Protocol, IETF. Accessed 24 November 2026

Further reading

Have an idea that should exist? Or a working product that needs more customers, a new website or a complete rework? Bring us anything. Apply with your idea

All notes