Free Robots.txt Generator — Create your robots.txt file online
Create a perfect SEO robots.txt file with the visual builder, ready-to-use templates (WordPress, e-commerce, SaaS) or the raw editor. Built-in validation, direct download.
robots.txt: complete SEO guide
The robots.txt file is a text file placed at the root of your site that tells crawlers (Googlebot, Bingbot, etc.) which pages they may or may not crawl. Properly configured, it improves the efficiency of your crawl budget and keeps your private pages out of search engines.
Essential directives
| Directive | Role | Example |
|---|---|---|
User-agent |
Defines the targeted robot. * = all |
User-agent: Googlebot |
Disallow |
Blocks access to a path | Disallow: /admin/ |
Allow |
Explicitly allows a path (takes precedence over Disallow) | Allow: /admin/logo.png |
Sitemap |
Declares the XML sitemap URL | Sitemap: https://example.com/sitemap.xml |
Crawl-delay |
Delay in seconds between two requests | Crawl-delay: 10 |
Host |
Canonical URL of the site (Yandex) | Host: example.com |
Most common robots
GooglebotGooglebot-ImageBingbotGPTBotanthropic-aifacebookexternalhitrobots.txt best practices
- Always declare your
Sitemap:in robots.txt to help Google discover it. - Use trailing slashes on directories:
Disallow: /admin/rather than/admin. - A
Disallow:empty means "allow everything". ADisallow: /means "block everything". - Block pages generated by session parameters (
?session=) to save crawl budget. - Check how Google reads your file in the robots.txt report of Google Search Console (Settings → robots.txt), which replaced the former robots.txt Tester.
Tools in the same category
List of tools similar to Robots.txt Generator
Popular tools
List of popular tools related to Robots.txt Generator
Practical questions about robots.txt
Build the file with the form or edit it directly, then save it as robots.txt at the root of your domain (https://example.com/robots.txt).
Frequently asked questions
Does Disallow keep a page out of Google?
No. Disallow stops crawling, not indexing: a blocked page can still appear in results, without a description, if other sites link to it. To keep a page out of search results, let it be crawled and add a noindex robots meta tag.
How do I block AI training crawlers without hurting search?
Add separate groups for the crawlers concerned, such as User-agent: GPTBot or User-agent: Google-Extended, each followed by Disallow: /. Googlebot and Bingbot keep their own rules, so your search visibility is unaffected.
Should I block CSS and JavaScript files?
No. Google renders pages like a browser; blocking the files it needs to display them can make it misjudge your pages, especially on mobile.