The robots.txt is a publicly accessible text file in a site's root directory. It tells crawlers which URLs they may fetch and therefore controls crawling.
The is a text file in a website's root directory, for example at https://example.ch/robots.txt. Using rules such as Disallow, it tells search engine crawlers which URLs they may fetch. This controls and helps avoid overloading servers.
Importantly, robots.txt controls crawling, not . A page blocked via Disallow can still appear in search results if other pages link to it. It is also not a security measure, since the file is publicly visible. Sensitive content belongs behind a login, password protection or server-side access control.
Unsupported rules such as Noindex: or crawl-delay should not be used. The robots.txt can also reference the .