Robots.txt Generator
Build a robots.txt file with user agent groups, Allow and Disallow rules and sitemap links. Start from a preset or import a live file, test any path with Google's matching rules, then download it.
- 100% free
- No sign-up
- Runs in your browser
Start from a preset
Presets replace the groups below and keep your sitemap URLs.
Group 1
Separate several with commas. * means every crawler.
Rules
No rules: everything is allowed for these user agents.
Google ignores this. Bing and Yandex respect it.
Sitemaps
Full URLs. Sitemap lines apply to every crawler.
robots.txt
24 bytesUser-agent: * Disallow:
Test a URL path
Uses Google's matching rules against the file above.
Allowed
Path tested: /
Group used: User-agent *. No rule in the matching group applies to this path, so it's allowed.
How robots.txt works
robots.txt is a plain text file at the root of your site that tells crawlers which paths they may request. It's made of groups. Each group starts with one or more User-agent lines, followed by Allow and Disallow rules. Sitemap lines can go anywhere and apply to every crawler.
Wildcards
*matches any sequence of characters, so/*.pdfmatches every path containing .pdf.$at the end anchors the rule to the end of the URL, so/*.pdf$matches paths that end in .pdf.- Rules are matched against the path and query string, and paths are case sensitive.
Things robots.txt can't do
It doesn't hide pages from search results (use noindex for that) and it doesn't protect private content, because anyone can read the file and badly behaved bots ignore it. Google also ignores Crawl-delay and the old Host directive, which is why this generator doesn't output Host.
How it works
How to use it
- Step 1
Start from a preset
Pick a starting point such as allow all, WordPress or block AI crawlers, or import the robots.txt from an existing site.
- Step 2
Edit the rules
Add user agent groups, Allow and Disallow paths, an optional crawl delay and your sitemap URLs. The preview updates as you type.
- Step 3
Test and download
Check whether a URL path is allowed for a given crawler, then copy or download robots.txt and upload it to your site root.
FAQs
Frequently asked questions
Answers to common questions about the Robots.txt Generator.
It must be at the root of the host, for example https://example.com/robots.txt. A robots.txt in a subfolder is ignored, and each subdomain (shop.example.com, blog.example.com) needs its own file.
Not reliably. Disallow stops crawling, but Google can still index a blocked URL without its content if other pages link to it. To keep a page out of search results, allow crawling and add a noindex meta tag or X-Robots-Tag header instead.
Google picks the group for the most specific user agent that matches the crawler, falling back to the * group. Within that group, the rule with the longest matching path wins. If an Allow and a Disallow rule are the same length, Allow wins. The tester on this page follows the same logic, including the * and $ wildcards.
No. Google ignores Crawl-delay and adjusts its crawl rate automatically based on how your server responds. Bing and Yandex do read it. Only set it if a crawler is putting real load on your server.
Use the Block AI crawlers preset. It adds a group that disallows GPTBot (OpenAI), ClaudeBot (Anthropic), Google-Extended (Google's AI training control), CCBot (Common Crawl), PerplexityBot, Applebot-Extended, Bytespider and meta-externalagent, while keeping normal search crawlers allowed. Robots.txt is a request, not an enforcement mechanism, so crawlers that ignore it won't be stopped.
Yes. Enter a domain and the tool fetches its /robots.txt, splits it into groups and loads it into the editor. Lines the generator doesn't edit, like Host or Clean-param, are listed so you can add them back by hand if you need them.
More free tools
Try another tool
- GeneratorMeta Tag GeneratorCreate the full set of SEO meta tags for a page: title, description, robots, canonical and social tags.Use for free
- GeneratorFAQ GeneratorTurn questions and answers into an FAQ section with FAQPage schema for Google.Use for free
- CheckerOn-Page SEO CheckerCheck a page's title, meta description, headings, canonical, indexing, images and Open Graph tags.Use for free
- PreviewLink Preview CheckerSee how a link will look when shared on Facebook, X, LinkedIn, WhatsApp and Slack.Use for free
- GeneratorOpen Graph Meta Tag GeneratorCreate Open Graph and Twitter card tags with a live share preview.Use for free
- PreviewGoogle Search PreviewPreview your title and meta description as a Google result on desktop and mobile.Use for free
Crawlers sorted. Now sort your DMs.
Hypello's AI agents answer Instagram comments and DMs instantly, share links and discount codes, and collect leads while you work on your site. Free for up to 1,000 DMs a month.