How to create a robots.txt file (and what it cannot do)
A robots.txt file sits at the root of your site and tells crawlers where not to go. robots.txt generator writes it for you.
Steps
- Choose Everyone or Nobody can crawl.
- List the folders to block, separated by commas.
- Add your sitemap address.
- Optionally tick the AI crawler option, then save the output as
robots.txtin your site root.
Use cases
- Keeping admin, cart and search pages out of crawl.
- Pointing search engines to your sitemap.
- Asking AI training bots to stay away.
Tips
- robots.txt blocks crawling, not indexing. A blocked page can still appear if others link to it. Use a noindex tag instead.
- Never block your CSS and JavaScript folders: Google needs them to render the page.
- Test the file after uploading by opening yoursite.com/robots.txt.
- Create the sitemap with the Sitemap XML generator.