robots.txt: building a correct file
Basic principles
robots.txt controls site crawling: it tells crawlers where not to go, saving crawl budget for important pages. The generator assembles the file from ready blocks and templates for popular CMSs.
The mandatory minimum: a User-agent: * section, blocked service sections, and a Sitemap directive with the full sitemap address.
Mistakes to avoid
Do not use robots.txt to “remove” pages from the index — that is what noindex is for. Do not block static files (CSS, JS, images): without them the search engine cannot render the page correctly.
After publishing, check the file with our robots.txt checker and in the webmaster panels — Yandex and Google will show how they interpret your rules.