What is robots.txt?
robots.txt is a file at the root of a website that tells crawlers which paths they should not fetch.
It controls crawling, not indexing. A blocked page can still appear in search results if other pages link to it. To keep a page out of results, use a noindex meta tag instead.
It can also point crawlers to your sitemap.