robots.txt rules, staging sites and private pages
robots.txt controls crawling, not indexing and not access. A blocked URL can stay known to search, a crawler cannot see a noindex it is not allowed to fetch, and private material needs real access control rather than a crawl rule.
This guide covers how to record robots.txt evidence, test rules against exact paths and specific crawlers, review a directory block before adding it, and keep staging sites and previews private. For page-level directives, see Auditing noindex and X-Robots-Tag directives.
Why blocking crawling does not reliably remove a URL from search
A crawl restriction is not a dependable way to remove a known URL from search. A crawler must access a response to see its noindex instruction, and private information needs access control.
State the actual objective
Decide whether the requirement is to limit crawling, exclude a public page from search, or protect private material. Record the affected URL and intended audience. These objectives should not be collapsed into a single instruction to block the page. Capture the current robots rules and the page response without assuming either proves the desired outcome.
Choose the appropriate control
For a public page intended to remain outside search, review the applicable indexing instruction and whether it can be retrieved. For confidential content, enforce authorization at the application or delivery layer. Keep a separate provider observation to track search visibility. Do not describe robots.txt as a password or a guarantee that a previously known URL disappears.
Why can a blocked page remain a search concern? The crawl rule and the provider’s knowledge of a URL are different matters. Use the relevant indexing or access-control mechanism for the actual objective.Recording robots.txt availability separately from page availability
Record robots.txt and page availability as separate requests. A successful page fetch does not establish that the robots file was delivered successfully at the same time.
Build a paired availability record
Request the relevant robots.txt URL and an affected page. Save each status, redirect destination, response body and timestamp. Confirm that the robots response contains the expected text rather than a branded error page. If the observations were taken at different times or through different tools, retain that difference in the report.
Investigate the actual failure
Give the operator the failed resource and its request evidence. Repair the routing or availability issue at the layer responsible for that resource. Retest both requests after the change. Do not infer a provider’s crawl decision from the local pair alone; a provider observation requires its own evidence and date.
Should the page status be copied into the robots.txt row? No. Each resource has its own response. Keep both rows even when they happen to return the same status.Checking robots rules for a case-sensitive path
Use the exact path spelling when testing a robots rule. A report that silently changes capitalization may be investigating a different request from the one found in the site’s links.
Preserve exact inputs
Copy the URL directly from the affected link or provider report. Record its path with capitalization intact and save the relevant robots.txt content with a timestamp. If alternative path spellings are reachable, test them separately and record their actual responses. Keep rule interpretation and page response evidence in distinct columns.
Check the intended route
Ask which spelling is the intended public destination and whether links consistently use it. Review the relevant rule using the crawler’s documented parsing behavior rather than a general assumption about the operating system. After any correction, retest the original path and the intended destination. Do not change a broad directory rule merely to fix one incorrectly cased link.
Should I lowercase every path in the audit spreadsheet? No. Preserve the original request exactly. A normalized comparison field can be useful, but it should not replace the evidence URL.Checking whether a bot-specific directive differs from a general directive
A crawler-specific instruction should be recorded with its scope. Do not summarize all robots values as one universal setting when the delivered response distinguishes audiences.
Capture each instruction separately
Save the exact meta names and values and applicable response headers from the final page. Note general instructions and any that name a crawler. Preserve the original spelling and response timestamp. When interpreting a specific crawler’s behavior, use its current documentation rather than assuming every provider recognizes the same tokens or directives.
Test the intended change
State which audience and page behavior the owner intends to affect. Correct the responsible template or header rule, then confirm all relevant delivered values again. Avoid broadening a restriction to every crawler while repairing a narrower one. Keep observed provider behavior distinct from the instruction you currently serve.
Can one crawler-specific value describe every search engine? No. Report its stated scope and check the applicable provider documentation before making a wider claim.Reviewing robots rules before removing an entire directory
Before restricting an entire directory, inventory the useful pages it contains. A broad rule may include public content that shares a path prefix with a utility page.
Build a route sample
List the directory’s main page types, including services, articles, pagination, assets and intentional private pages where applicable. Record the purpose and desired accessibility of each group. Review existing public links and sitemap membership so the proposed change is evaluated against real discovery paths rather than a path name alone.
Test the proposed scope
Have the operator evaluate the exact rule against representative URLs before deployment. Preserve public access where intended, and use proper access control for confidential resources. After the change, repeat the route checks and record the actual delivered configuration. Do not call a directory removal successful solely because a scanner stops seeing its pages.
What is the main risk of a directory-wide change? The selected path may contain several page purposes. A broad change can affect useful public pages that were never part of the original problem.Separating crawl permission from permission to access private data
A crawler permission is not authorization to read private information. Keep search configuration separate from the access controls protecting confidential pages and files.
Describe the protected resource
Record the resource type, intended audience and direct URL pattern without including private data in the public report. Test the authorization boundary in an appropriate controlled context. A page absent from navigation or a sitemap may still have a directly accessible URL, so discovery checks alone cannot establish privacy.
Verify the access boundary
Ensure unauthorized requests do not receive the protected material. Then review search preferences for any public representations that remain. Avoid using robots rules or noindex as a substitute for authentication. After a routing change, retest the direct resource path as well as the page that normally links to it.
Can a hidden link make a document private? No. Treat the actual response to an unauthorized request as the access-control evidence, not whether the link is easy to find.Keeping a staging site private with access control
A staging site containing private or unfinished material needs actual access control. Search exclusions can communicate indexing preferences but do not make a publicly reachable preview confidential.
Inventory preview access
List the staging hostname, deployment aliases and any preview routes that may be reachable directly. Test anonymously and record whether the intended authorization boundary is enforced. Do not include passwords or private page contents in the report. Check whether public navigation or metadata points to a preview URL.
Close the exposure and retest
Apply the appropriate access control for the environment, then test the direct preview address again without an authenticated session. Remove unintended public links to the preview. Keep staging restrictions separate from production rules so the public site does not inherit a private environment’s settings. Provider exclusion observations are a secondary check, not the security boundary.
Is noindex enough for confidential staging content? No. Use authorization or another appropriate access-control mechanism. A search directive does not prevent someone from requesting an accessible URL.Auditing preview URLs that were accidentally linked publicly
A public link to a preview is both a discovery mistake and a possible exposure to investigate. Removing the link fixes one path, but the preview’s own accessibility must be checked separately.
Trace the reference
Record the source page, anchor text and exact preview destination. Search the relevant generated navigation, metadata and article bodies for the same hostname. Preserve a small list of affected public references. Do not publish private preview content while documenting the mistake. Establish whether the preview was intended to be public at all.
Repair references and access
Point public references to the approved production destination where one exists. Apply the appropriate access control to private previews, then verify the direct preview URL anonymously. Recheck the public source page after deployment. Search-provider cleanup is a separate follow-up and cannot substitute for correcting current access.
Is deleting the public link enough? It removes that discovery path. It does not necessarily prevent direct access to the preview URL.Checklist
- Why blocking crawling does not reliably remove a URL from search. A crawl restriction is not a dependable way to remove a known URL from search.
- Recording robots.txt availability separately from page availability. Record robots.txt and page availability as separate requests.
- Checking robots rules for a case-sensitive path. Use the exact path spelling when testing a robots rule.
- Checking whether a bot-specific directive differs from a general directive. A crawler-specific instruction should be recorded with its scope.
- Reviewing robots rules before removing an entire directory. Before restricting an entire directory, inventory the useful pages it contains.
- Separating crawl permission from permission to access private data. A crawler permission is not authorization to read private information.
- Keeping a staging site private with access control. A staging site containing private or unfinished material needs actual access control.
- Auditing preview URLs that were accidentally linked publicly. A public link to a preview is both a discovery mistake and a possible exposure to investigate.