Where robots.txt belongs

It must live at the domain root, such as https://example.com/robots.txt.

Basic example

User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml

Dangerous mistakes

Validate robots.txt

Find common crawl warnings before publishing.

Open Robots Validator