robots.txt Generator
Build a robots.txt file from a user-agent, allow and disallow paths, crawl-delay, a sitemap URL, and one-click presets that block common AI crawlers.
robots.txt Generator — Enter the paths you want to allow or block, set an optional crawl-delay and sitemap URL, and tick the AI-crawler presets to get a clean, ready-to-upload robots.txt. The file is assembled live as you type and can be copied or downloaded. Everything runs in your browser — none of your paths or rules are sent to a server.
What is robots.txt Generator?
robots.txt Generator is a free in-browser tool that writes the robots.txt file web crawlers read at the root of your site to decide what they may fetch. You set the User-agent (default *), list one Disallow path per line and any Allow exceptions, optionally add a Crawl-delay and a Sitemap URL, and the tool turns it all into the correct directives. It also includes a checkbox preset that blocks well-known AI training crawlers — GPTBot, ClaudeBot, CCBot, and Google-Extended — by appending a separate group for each. Site owners, SEO specialists, and developers use it when launching a site, hiding admin or staging paths from search engines, or opting out of AI scraping. Copy the result into a file named robots.txt at your domain root, or use the Download button.
How to use robots.txt Generator
- Enter the user-agent the rules apply to, or leave it as * for all crawlers.
- Type the paths to block in the Disallow box, one per line (for example /admin/ or /private/).
- Add any Allow exceptions, one per line, to re-permit sub-paths inside a blocked folder.
- Optionally set a crawl-delay in seconds and paste your full sitemap URL.
- Tick the AI-crawler checkboxes (GPTBot, ClaudeBot, CCBot, Google-Extended) to block them from scraping your content.
- Copy the generated robots.txt or click Download, then place the file at the root of your site.
Examples
Block admin and staging
Input
User-agent: * Disallow: /admin/ Disallow: /staging/ Sitemap: https://example.com/sitemap.xml
Output
User-agent: * Disallow: /admin/ Disallow: /staging/ Sitemap: https://example.com/sitemap.xml
Allow inside a blocked folder
Input
User-agent: * Disallow: /downloads/ Allow: /downloads/public/
Output
User-agent: * Disallow: /downloads/ Allow: /downloads/public/
Opt out of AI crawlers
Input
Block GPTBot, ClaudeBot, CCBot, Google-Extended
Output
User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: CCBot Disallow: / User-agent: Google-Extended Disallow: /
Frequently asked questions
- What does robots.txt actually do?
- It is a plain-text file at your site root that tells compliant crawlers which paths they may or may not request, using Allow and Disallow rules grouped by User-agent. It is a request, not an enforcement: well-behaved bots like Googlebot honor it, but it does not block access for tools that ignore it, so never use it to hide truly sensitive data.
- How do the AI-crawler block presets work?
- Each checkbox appends a dedicated group such as 'User-agent: GPTBot' followed by 'Disallow: /', which asks that crawler not to fetch any page. GPTBot is OpenAI's crawler, ClaudeBot is Anthropic's, CCBot is Common Crawl, and Google-Extended controls use of your content for Google's AI models. Ticking a box adds its group; unticking removes it.
- What is the difference between Allow and Disallow?
- Disallow lists path prefixes a crawler should not request, while Allow re-permits a more specific sub-path inside a disallowed folder. For example, Disallow: /files/ with Allow: /files/public/ blocks the folder but keeps the public sub-folder crawlable. Enter one path per line in each box.
- Where do I put the generated file?
- Save it as a file literally named robots.txt and upload it to the root of your domain so it is reachable at https://yourdomain.com/robots.txt. Crawlers only look there; a robots.txt in a sub-folder is ignored. Use the Download button to save it directly.
- Is anything I type sent to a server?
- No. The robots.txt is generated entirely in your browser with JavaScript. Your paths, user-agent, sitemap URL, and choices are never uploaded, stored, or transmitted, so it is safe to draft rules for private or pre-launch sites.
Related tools
Hreflang Tag Generator
Generate hreflang link tags for a multilingual page from a list of locale and URL pairs, with an optional x-default and a self-referencing tag.
JSON-LD Generator
Generate valid JSON-LD structured data for Article, Product, FAQPage, HowTo, LocalBusiness, Event, Recipe, BreadcrumbList, and Organization schemas from a simple form.
Keyword Density Checker
Analyze any text to count word frequency and keyword density as 1-, 2-, or 3-word phrases, with an over-optimization warning.
Meta Tag Generator
Generate SEO, Open Graph, and Twitter Card meta tags for your page from a title, description, canonical URL, image, site name, and card type.