Enter one allowed or blocked URL path per line.
Robots.txt Generator
Generate robots.txt with crawl rules, sitemap entries and AI bot preferences.
Robots.txt Generator — what does it do?
Generate robots.txt with crawl rules, sitemap entries and AI bot preferences. This tool focuses on one SEO task. Consider the results alongside your website’s overall technical context.
Explore more SEO tools →Robots.txt Generator: what does it do?
Create Allow and Disallow rules and optional bot-specific instructions. Review the generated file before publishing it.
Build Allow and Disallow rules in one place.
Include the address of your XML sitemap.
Set supported crawler preferences individually.
Robots.txt Generator explained
What does a robots.txt file do?
A robots.txt file tells compliant crawlers which URL paths they may request. It is not an access-control mechanism, does not hide confidential files, and does not itself guarantee that a URL will be excluded from search results.
How to generate crawl rules
Enter one path per line in the Allow and Disallow fields. Keep the leading slash, check that you are blocking only intended areas, then generate and review the output before placing the file at the root of your host.
AI crawlers and bot preferences
Different crawlers may use different user-agent tokens. GPTBot and OAI-SearchBot serve different purposes; individual bot preferences should be deliberate rather than copied from another website. Always verify current crawler documentation.
How to publish and verify
Save the generated text as robots.txt at the host root, for example https://example.com/robots.txt. Confirm that it returns HTTP 200 and plain-text content. Test a few critical URLs in Search Console and check the rendered site navigation.
Common mistakes
Do not disallow your stylesheets, scripts, canonical landing pages or sitemap accidentally. A Disallow rule is not a noindex tag. For private pages, use authentication; for removal from Google Search, use appropriate index directives on crawlable URLs.
Frequently asked questions
Should every site have robots.txt? No. It is useful when you need specific crawling instructions. Can a disallowed page appear in search results? Yes, a URL can still be discovered from links. Does Sitemap replace robots.txt? No, they serve different purposes.
Robots.txt Generator: a safe example and common mistakes
Robots.txt is not a security boundary. It gives crawl instructions to compliant user agents. These sample directives are educational and should be adapted to your real URL structure.
Example input
Blocked path: /cart/ · Sitemap: https://example.com/sitemap.xml
Example output
User-agent: * Disallow: /cart/ Sitemap: https://example.com/sitemap.xml
Weak implementation
Disallow: / can block crawling of the entire site. Broad exclusions such as Disallow: /assets/ can prevent crawlers from fetching stylesheets and scripts needed for rendering.
Better implementation
Block only specific paths that do not need crawling, rather than entire content sections. Protect confidential resources with authentication, not robots.txt. Keep important canonical landing pages accessible.
How to interpret the result
Publish the generated file at /robots.txt on the relevant host and verify HTTP 200 and its plain-text body. Check that the intended user-agent group applies to each rule. A URL disallowed from crawling can still be discovered and shown as a URL in search results.
Before publishing
- Verify the rules are hosted at the correct site root.
- Avoid blocking CSS, JavaScript and important content unintentionally.
- Check that the XML sitemap reference resolves successfully.
- Review official documentation for bot-specific user-agent tokens.
Get started in 3 steps.
Add your sitemap URL and choose bot preferences if needed.
Generate the text, review the rules and publish robots.txt at the website root.
Common questions about Robots.txt Generator.
Does robots.txt prevent indexing?+
Should I block CSS and JavaScript?+
Are AI bot settings mandatory?+
Should I test robots.txt before publishing?+
Official reference: Google Search Central documentation ↗