When to use it
Use this tool to create a robots.txt file, the small text file that tells search engine and AI crawlers which parts of your site they may visit. It is useful when launching a site, keeping crawlers out of admin or checkout pages, avoiding endless filter and session URLs, pointing crawlers to your sitemap, or opting out of AI training.
How to use it
- Choose the Default for all crawlers: Allow everything or Block everything.
- List Folders or pages to block, one per line, each starting with /.
- Optionally, add Exceptions to allow inside blocked folders.
- Tick Block AI training and AI search crawlers if you want to opt out.
- Add your Sitemap URL and, if needed, a Crawl delay in seconds.
- Check the robots.txt preview, then Copy robots.txt or Download robots.txt.
Worked example
An online shop wants search engines to skip its admin area, its cart and URLs with session IDs. The default list does exactly that:
User-agent: *
Disallow: /admin/
Disallow: /cart
Disallow: /*?sessionid=
Add https://example.com/sitemap.xml as the sitemap URL and a Sitemap line is added at the end, so crawlers find all your product pages. If the shop also wants to keep its product descriptions out of AI training, ticking the AI option adds one more group that lists each AI crawler by name, such as GPTBot, ClaudeBot and PerplexityBot, followed by Disallow: / to keep them off the whole site. Ordinary search engines still follow the rules above.
Allow and Disallow together
An exception lets crawlers into one part of a blocked folder. For example, block /private/ but allow /private/press-kit/. The more specific rule wins, so the press kit stays visible while the rest of the folder is skipped.
Tips
- Block as little as possible. Every blocked path is something search engines will not see.
- Use a trailing slash for folders. /admin/ blocks everything in that folder, while /admin also blocks /administrator.
- Test after uploading. Google Search Console has a robots.txt report that shows how Google reads your file.
- Keep CSS and JavaScript crawlable. Search engines need them to see your pages properly.
Common mistakes
- Blocking the whole site by accident. Disallow: / on its own blocks everything. Check the preview carefully.
- Using robots.txt to remove pages from Google. A blocked page can still appear in results if other sites link to it. Use noindex instead.
- Putting the file in the wrong place. It must be at the root of the domain.