User Agents

Disallow Paths

Examples: /admin/, /private/, *.pdf, /search?*

Allow Paths

Examples: /public/, /images/, /css/

Crawl Settings

Delay between requests (0-86400 seconds). Leave empty for no delay.

Sitemap

Full URL to your XML sitemap

Generating your robots.txt file...

Generated Robots.txt

About Robots.txt

Robots.txt is a file that contains instructions on how to crawl a website. It is also known as robots exclusion protocol, and this standard is used by sites to tell the bots which part of their website needs indexing. Also, you can specify which areas you don't want to get processed by these crawlers; such areas contain duplicate content or are under development.

Search Engine Crawlers

Major search engines like Google, Bing, Yahoo, and others respect robots.txt directives. This helps control how your site appears in search results and manages crawl budget effectively.

Security Considerations

While robots.txt can block well-behaved crawlers, malicious bots may ignore these rules. Don't rely on robots.txt alone for security - use proper authentication and access controls.

Common Directives

  • User-agent: Specifies which crawler the rules apply to
  • Disallow: Blocks access to specific paths
  • Allow: Permits access (overrides disallow)
  • Crawl-delay: Sets delay between requests
  • Sitemap: Points to your XML sitemap

Best Practices

  • Place robots.txt in your website's root directory
  • Use specific paths rather than broad wildcards when possible
  • Test your robots.txt with Google Search Console
  • Include your sitemap URL for better indexing
  • Regularly review and update your robots.txt file

Free Robots.txt Generator — Control Search Engine Crawlers

A robots.txt file is a plain-text file placed in the root of your website that tells search engine crawlers which pages or directories they are allowed or not allowed to visit. Our free generator creates a correctly formatted robots.txt file based on your configuration — no manual editing required.

Robots.txt is one of the first files Google, Bing, and other crawlers check when they visit your site. A properly configured file prevents crawlers from wasting crawl budget on low-value pages, keeps sensitive URLs out of search indexes, and helps ensure your sitemap is discovered quickly.

What Is robots.txt and How Does It Work?

When a search engine bot visits your website, it first requests https://yoursite.com/robots.txt before crawling any other page. The file contains a set of rules (called directives) that tell the bot which URLs it can and cannot access.

Important: robots.txt is a directive, not a security measure. Well-behaved bots (Google, Bing, etc.) respect it. Malicious scrapers and bad bots may ignore it entirely. Never use robots.txt to hide sensitive data — use server authentication for that.

A basic robots.txt structure looks like this:

User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /

User-agent: Googlebot
Allow: /

Sitemap: https://yoursite.com/sitemap.xml

Key robots.txt Directives Explained

DirectivePurposeExample
User-agentSpecifies which crawler the rules apply to. Use * for all bots.User-agent: Googlebot
DisallowBlocks a URL path from being crawled.Disallow: /wp-admin/
AllowExplicitly permits a path, even within a disallowed directory.Allow: /wp-admin/admin-ajax.php
SitemapPoints crawlers to your XML sitemap location.Sitemap: https://site.com/sitemap.xml
Crawl-delayRequests the bot wait N seconds between requests. Not supported by Google.Crawl-delay: 10

What Pages Should You Block in robots.txt?

  • Admin and login pages/admin/, /wp-admin/, /login — no SEO value, wastes crawl budget
  • Duplicate or parameter URLs?sort=, ?page=, ?ref= — prevents duplicate content indexing
  • Internal search results/search?q= — search result pages are thin content with no ranking value
  • Staging and test environments — block entire staging subdomains from being indexed
  • Checkout and cart pages/cart, /checkout — no direct SEO benefit and may expose session data
  • PDF and media uploads/wp-content/uploads/ (only if PDFs should not rank separately)
  • API endpoints/api/ — JSON responses should not appear in search results

Common robots.txt Mistakes

  • Blocking CSS and JS files — Google needs to render your pages properly. Blocking stylesheet and script directories prevents Google from seeing how your pages look, harming rankings.
  • Blocking the entire site accidentallyDisallow: / under User-agent: * prevents all crawling. A common mistake when copying templates.
  • Using robots.txt to hide sensitive data — bots that don't follow robots.txt can still access disallowed URLs. Use authentication or server-level access control instead.
  • Not including your sitemap — the Sitemap directive helps Google discover your XML sitemap faster, especially for large sites.
  • Trailing slash differencesDisallow: /page and Disallow: /page/ are different rules. Always test after generating.

How to Install robots.txt on Your Website

  1. Generate your robots.txt using this tool with your desired settings.
  2. Download the file or copy the content.
  3. Upload the file to the root directory of your domain (e.g., public_html/robots.txt or www/robots.txt).
  4. Verify it's accessible at https://yourdomain.com/robots.txt in your browser.
  5. For WordPress: use a plugin like Yoast SEO or Rank Math, or upload directly via FTP/cPanel.
  6. Submit your sitemap URL to Google Search Console and Bing Webmaster Tools after updating robots.txt.

Frequently Asked Questions

Does robots.txt affect Google rankings?

Indirectly, yes. A well-configured robots.txt prevents crawl budget waste on low-value pages, helping Google discover and index your important pages faster. Blocking duplicate content can also prevent thin-content penalties.

Can I disallow specific bots like GPTBot?

Yes. Use a specific User-agent block: User-agent: GPTBot then Disallow: / to block OpenAI's crawler from your entire site. Similarly, User-agent: CCBot blocks Common Crawl (used by many AI training datasets).

What is the difference between robots.txt and noindex?

robots.txt Disallow prevents crawling (bot never visits the page). The noindex meta tag or header prevents indexing (bot visits but doesn't add to search results). A disallowed page may still appear in search results if other sites link to it — Google just doesn't know its content.

Can I have multiple robots.txt files?

No. There can only be one robots.txt per domain at the root level. For subdirectories, all rules must be in the single root-level robots.txt. Subdomains (blog.example.com) have their own separate robots.txt.

Is this robots.txt generator free?

Yes, completely free. No account or sign-up needed. Generate, copy, and download your robots.txt file instantly.