Skip to main content
ToolSmartly

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.

Global settings
robots.txt preview LIVE

          

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.

⚠️ robots.txt ≠ data protection! The robots.txt file is a convention, not a security measure. Malicious bots ignore these directives. To protect sensitive data, use authentication or server rules.

Essential directives

DirectiveRoleExample
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

Googlebot
Google — principal
Googlebot-Image
Google Images
Bingbot
Microsoft Bing
GPTBot
ChatGPT / OpenAI
anthropic-ai
Claude / Anthropic
facebookexternalhit
Meta / Facebook

robots.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". A Disallow: / 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.

Complementary tools

Tools often used with 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.