Robots.txt Generator
Pick bots and path rules to build a robots.txt file and download it.
Settings
robots.txt Preview
Usage: Save the generated file as robots.txt in your website's root directory.
A robots.txt file lives at the top of your domain (https://example.com/robots.txt), and well-behaved crawlers skip the paths it lists. The file is built in this page, and the domain you type is not sent anywhere.
Choose the Standard preset and enter https://example.com/sitemap.xml as Sitemap URL to get this.
User-agent: * Allow: / Disallow: /admin/ Disallow: /private/ Disallow: /*.json$ Disallow: /api/ Sitemap: https://example.com/sitemap.xml
* matches any characters and $ marks the end of a URL, so /*.json$ blocks URLs ending in .json. Changing the preset erases rules you added, so pick the preset first. Add Rule attaches the rule to whatever bot is in the User-agent box at that moment, so choose the bot before typing the path.
Block AI Crawlers adds Disallow: / for GPTBot, ChatGPT-User, Claude-Web, Bytespider, CCBot, anthropic-ai and Google-Extended. It has no * block, so search bots like Googlebot still crawl normally.
A bot with its own named block ignores the * block, so repeat the paths there. Rules match by prefix: /private also blocks /private-notes.html. Disallow stops crawling but not indexing, so use a noindex meta tag to keep a page out of search. The file is public, so do not list admin addresses you want hidden.