What is robots.txt for?
Robots.txt is a text file at the root of a host that communicates crawling rules to compliant automated clients. Rules can apply to particular user agents and URL paths. Its main role is managing access for crawling, not protecting confidential information or reliably removing URLs from search results. Anyone can request the file and read the paths it names.
Download blocking and indexing
The Disallow directive asks the robot not to download matching resources. The search engine can still learn the address from external links. Noindex works differently: it must be read from the page or header of the response. Blocking access and then waiting for the robot to notice the new noindex may prevent the desired effect from being achieved.
Example from the store
Filters and sorting can create many address combinations. Before blocking, determine which combinations correspond to valuable categories and which only change the order of the same products. Verify that product discovery does not depend on these paths. A ban on all parameters may accidentally hide pagination or useful resources.
How to implement rules?
Save existing settings and XML sitemap link. Prepare examples of addresses that should remain accessible and be blocked. Include case, trailing slashes and pattern support. Check for appropriate hosts and protocols, correct file response, and post-publish behavior. Keep a copy because a broad rule may cover the entire site.
Bugs and security
Do not secure your dashboard, customer data or documents solely via robots.txt. Permissions and authentication are needed. Do not block CSS, JavaScript and images necessary to understand public pages. A single-client rule does not control all bots, and declared rules do not replace excessive traffic protection.
How to check the result?
Control access to representative addresses, robot activity, and discovery of important templates. Fewer requests aren't success if products become harder to find. Document the reason for each rule and refer back to it after filter changes. Use the right directives for indexing and real access control to protect private data.
Example of conflict with exclusion from the index
Let's assume that the address /results/ is to disappear from the search engine. If you set noindex on it and block downloads in robots.txt at the same time, the robot may not read the new HTML instruction. First, define the goal: limiting the robot's traffic or removing the page from the index. These are different tasks. The private panel should be protected by authentication; The Disallow entry itself does not prevent a human from opening the address.
Check rules for a specific host and path, even after changing the domain or environment. Too broad Disallow: / may cover the entire site. A test file left in production may invalidate the point of further editorial work. Before publishing, keep the previous version and test some important addresses and resources needed for rendering, rather than judging validity by the mere existence of the file.