robots.txt
Controls which URLs a crawler is allowed to request; it is not a reliable page-removal method.
Crawling & indexing
A robots.txt rule can stop Googlebot from crawling a URL, but it does not reliably keep that URL out of Search. If the page itself should not appear in Google, let Google crawl it and provide a noindex directive. Use password protection for private content.

The short answer
Use noindex when a public page should be excluded from Google Search, and keep the page crawlable so Google can read the directive. Use robots.txt when your goal is to manage crawler access. Use authentication for private information. Search Console can help you check what Google has indexed and what it can see now, but neither a test nor a request guarantees an immediate search-result change.
Controls which URLs a crawler is allowed to request; it is not a reliable page-removal method.
An instruction on a page that Google can process to keep that page out of its index.
Password protection restricts access; search directives do not secure content.
The choice is not simply between two ways to hide a URL. robots.txt controls crawling: it tells compliant crawlers which URLs they may request. noindex is an indexing instruction: when Google can crawl and process the page, the directive tells it not to include that page in Google Search. Google describes robots.txt as a way to manage crawler traffic, not as a mechanism for keeping a web page out of Search.
Custom diagram
A decision flow distinguishes privacy, temporary hiding, search exclusion, and crawl management.
Yes → require authentication or password protection.
Use Search Console Removals while you address the underlying page.
Use noindex and allow Google to crawl the page.
Use robots.txt for crawl management, not guaranteed removal.
Compare URL Inspection's indexed data with its live test.
| Control | Primary purpose | What it does not guarantee |
|---|---|---|
| robots.txt | Manage crawler access to URLs. | That a URL cannot appear in Search. |
| noindex | Tell Google not to index a page it can process. | A particular removal time or search-result schedule. |
| Password protection | Restrict access to private content. | A specific search outcome for previously discovered URLs. |
| Search Console Removals | Request a temporary hide from Search. | Permanent exclusion by itself. |
Google can discover a URL from links on other pages even when robots.txt disallows crawling it. If Google cannot fetch the page, it cannot read the page's content or its noindex directive. The URL may still be indexed without its page content and can appear in results without a description. This is a possibility, not an outcome for every blocked URL.
Custom diagram
An external or internal link can reveal a URL while a robots.txt rule prevents Googlebot from fetching its page.
Google may discover the address from another crawlable page.
Googlebot skips the request to that URL.
The blocked page's content and page-level directives cannot be read in that request.
The URL can be indexed without its page content.
Start by naming the outcome, not the directive. A page intended for users but not for search generally calls for noindex. A URL that should not be fetched for crawl-management reasons may call for robots.txt. Content that must remain confidential needs an access restriction. These goals are different, and one mechanism should not be expected to perform all three.
Put authentication or password protection in front of it. Do not rely on robots.txt or noindex as security controls.
Pass criterionAn unauthenticated visitor and crawler cannot retrieve the protected content.
Use the Search Console Removals tool for a temporary hide, and separately decide what lasting page change is appropriate.
Pass criterionThe removal request is treated as temporary; the underlying access or indexing state is addressed separately.
Provide noindex in the page metadata or an appropriate response header, and leave the URL crawlable so Google can read it.
Pass criterionA live inspection can fetch the page and identify the noindex instruction.
Use robots.txt to control crawler access to the relevant URL pattern. Do not interpret that rule as a guarantee that its URLs cannot appear in Search.
Pass criterionThe crawl rule matches the intended URLs and does not block pages whose directives Google needs to read.
| Your goal | Starting point | Important check |
|---|---|---|
| Exclude a public page from Google Search | noindex | Googlebot can crawl and read the directive. |
| Reduce crawler access to a URL pattern | robots.txt | The rule does not block pages that need to be crawled for another instruction. |
| Keep content confidential | Authentication or password protection | The content is not publicly retrievable. |
| Hide a result temporarily | Search Console Removals | A successful request lasts about six months; it is not permanent control. |
For an HTML page, a robots meta tag can carry the noindex instruction. Google also documents a robots meta example for JavaScript-powered pages. Whichever implementation you use, the key operational check is that Google can fetch the page and encounter the directive. If your site uses a CMS, look for its search-visibility setting or documentation; you may not need direct access to the HTML or robots.txt file.
<head>
<meta name="robots" content="noindex">
</head>Illustrative HTML for a page-level directive; not tested in a particular CMS or deployment. Confirm that the rendered page includes the tag and that robots.txt does not disallow the URL.
Three neighboring problems are easy to confuse with page exclusion. Privacy requires access control. A fast, temporary hide is what Search Console Removals is for; Google says a successful request lasts about six months. Duplicate URLs are a canonicalization problem: Google advises against using robots.txt for canonicalization and says noindex is not the preferred way to select a canonical page among duplicates. Use redirects, rel="canonical", or other appropriate canonical signals for that separate task.
Custom diagram
Privacy, temporary search-result hiding, duplicate consolidation, and lasting page exclusion lead to different controls.
Restrict access with authentication.
Use Search Console Removals; plan a lasting solution separately.
Choose an appropriate canonicalization method.
Use a crawlable page with noindex.
In Google Search Console, open the correct property and enter the complete URL in the URL Inspection bar. Read the indexed information and the live test as two different views: the indexed report describes Google's most recently stored version, while Test live URL checks the page as it can be fetched now. A live test can help identify whether the current page is accessible and whether it might be indexable; it does not prove what is currently in the index or predict canonical selection.
In Search Console, enter the full URL in the top URL Inspection field. Review the reported indexing status and, when available, the indexed page's robots information and Google-selected canonical.
Pass criterionYou have recorded what Google reports for its stored version, rather than treating the report as a live fetch.
Use the live test to check the page as it is currently accessible to Google. If you expect noindex, check that the URL is not blocked from crawling and that the directive is present in the fetched or rendered page.
Pass criterionThe live test can fetch the page and the result is consistent with the directive you intended to publish.
If you have corrected the page and want Google to recrawl it, you can request indexing in URL Inspection. Do not treat the request as a command to index or remove the URL.
Pass criterionYou have a request recorded, but continue monitoring for Google's processed state rather than assuming an immediate change.
If the indexed report still shows the old state while the live test shows the corrected page, Google may not yet have recrawled and reprocessed the change. If the live test cannot access the page, investigate the response, access controls, and robots.txt before relying on a page-level noindex. Google does not guarantee that it will crawl, index, or serve a page, and a request does not guarantee instant inclusion or removal.
For each affected URL, write down the required outcome before changing a directive. That small distinction prevents the most common mistake: blocking a page that needs to remain crawlable for Google to see its noindex instruction.
Primary sources and documentation
Every changing search, browser, interface or technical-behavior claim in this guide is tied to a current primary source.
Need help diagnosing and implementing the fix?
Get help diagnosing URL access, directives, and the signals affecting how Google processes your site.
Discuss crawl and indexation
ArticleFaceted Navigation SEO: How to Control Crawl & Indexation Without Killing Useful Filter Pages
ArticleHow to Check Whether Two Pages Link Back With Hreflang
ArticleHow to Write Title Tags for Category and Product Pages
ServiceCrawl Budget & Indexation Audit
ServiceTechnical SEO Services & Audit