Robots.txt
Robots.txt is an exclusion standard that suggests certain URLs should not be visited by search engine crawlers, though this file serves as guidance rather than enforcement. Google could still index URLs listed in robots.txt if they discover those pages through other sources like Backlinks or Internal Links, without actually crawling the blocked page content.
To prevent pages from appearing in search results, it works better to let Google crawl the page and use noindex Meta Tags rather than blocking with robots.txt. The robots.txt file helps prevent crawling and data access that should probably be protected by stronger security measures anyway, supporting Crawlability control and Technical SEO management.
This file must be located at the exact root domain location to function properly, and has become the standard way to announce Sitemap locations to crawlers. While sitemap announcement goes beyond the original robots.txt standard, this practice is so commonly used that it functions as part of modern Implementation and Site Structure organization.