Meaning and context
Robots.txt is a text file that provides crawling instructions for bots that follow the Robots Exclusion Protocol. It tells specified crawlers which parts of a site they may request.
Its main purpose is crawl management. It is not a password, and blocking a URL there does not reliably remove that URL from search results. Those distinctions matter before you change a rule affecting important pages.
Understand the basic parts of a rule
A robots.txt file is placed at the root of the relevant site origin. Rules identify a user-agent and use directives such as Allow or Disallow to describe permitted or restricted paths.
A group aimed at one crawler can behave differently from a general group. Review the applicable crawler’s documentation rather than assuming every bot interprets all possible instructions identically.
Keep changes specific and understandable. A broad path restriction may affect far more URLs than intended, particularly on sites with shared directory structures or generated parameters.
Crawling restrictions are not indexing instructions
Google explains that a blocked URL may still appear in search results if it is discovered through other links. The crawler can know the address exists without being able to retrieve its content.
If the goal is exclusion from the index, an accessible noindex directive may be appropriate. Blocking crawling can prevent Google from seeing that directive, so combining the two without understanding their roles can undermine the intended result.
For confidential information, use authentication or other access controls. Robots.txt is public and depends on crawler cooperation. Listing a private-looking path in it does not make the contents private.
A practical troubleshooting example
Imagine a store introduces a rule intended to reduce crawling of filter combinations. After deployment, important category pages also become blocked because their paths match the same pattern.
The team should inspect representative URLs, identify the matching rule and narrow the restriction. Testing only the homepage would not reveal the category problem.
Before changing the file, document the intended scope and keep a copy of the previous rules. Afterward, verify the actual published file and check that valuable pages remain accessible to the relevant crawler.
Use crawl controls deliberately
A small website may need little crawl management. A large site generating many low-value URL combinations may need a more considered approach. Start with an observed problem rather than copying another site’s file.
Also consider resources needed to render a page. Blocking essential files can make it harder for a crawler to understand the experience, so assess the effect on the page rather than only the file extension.
Review rules when launching new sections, migrating platforms or changing URL structures. A restriction that made sense for an old feature can quietly interfere with something valuable months later.
Common questions
Does every bot obey robots.txt?
No. It is a cooperative protocol, not an access barrier. Do not rely on it to secure sensitive information or prevent all unwanted requests.
Can I put noindex in robots.txt?
Google does not support a noindex rule in robots.txt. Use a supported meta tag or HTTP response header for indexing control and ensure the crawler can retrieve it.
Sources & further reading
Examples are illustrative unless a source is explicitly identified. Platform features and reporting definitions can change.
