Skip to main content
Back to Tools

Robots.txt Generator

Generate a robots.txt file to control search engine crawlers.

Generated robots.txt
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /private/

Sitemap: https://example.com/sitemap.xml
6 lines102 bytes
Rule 1: Potential conflict between Allow and Disallow paths.
Rule 1

Time between successive requests. Not supported by Google.

Security
API & Data
E-commerce
WordPress
Common

A robots.txt file is an essential component of any website's SEO strategy. It tells search engine crawlers like Googlebot, Bingbot, and others which pages they can and cannot access on your site. By properly configuring your robots.txt file, you can prevent search engines from crawling duplicate content, protect sensitive areas of your site, and optimize your crawl budget for better indexing of important pages.

How to Use This Tool

1

Select a User Agent

Choose which search engine crawler you want to create rules for. Use the wildcard (*) to apply rules to all crawlers, or select specific bots like Googlebot or Bingbot for targeted control.

2

Add Allow and Disallow Rules

Define which paths search engines can (Allow) or cannot (Disallow) crawl. Use specific paths like /admin/ to block entire directories, or use patterns to control access to multiple URLs.

3

Set Optional Crawl Delay

Add a crawl delay (in seconds) to control how frequently crawlers access your site. This is useful for servers with limited resources, though Google ignores this directive.

4

Add Your Sitemap URL

Include your sitemap URL to help search engines discover all your important pages. This improves indexing efficiency and ensures no pages are missed.

5

Download and Upload

Download the generated robots.txt file and upload it to the root directory of your website. The file must be accessible at yourdomain.com/robots.txt.

Why Use This Tool?

  • Control which pages search engines can crawl and index
  • Prevent duplicate content issues by blocking parameter URLs
  • Protect sensitive areas like admin panels and user data
  • Optimize crawl budget for large websites
  • Guide search engines to your XML sitemap
  • Block resource-heavy pages that slow down crawling
  • Prevent staging or development content from being indexed
  • Comply with SEO best practices for technical optimization

Common Use Cases

Blocking Admin and Private Pages

Prevent search engines from crawling administrative areas, login pages, and user dashboards that shouldn't appear in search results.

Example: Disallow: /admin/ Disallow: /login/ Disallow: /dashboard/

Managing URL Parameters

Block URLs with tracking parameters, session IDs, or sorting options that create duplicate content.

Example: Disallow: /*?utm_ Disallow: /*?session_id=

Protecting API Endpoints

Keep API routes and internal endpoints out of search indexes while allowing main content pages.

Example: Disallow: /api/ Allow: /

Staging Environment Protection

Block staging or development subdomains from being indexed while testing new features.

Example: User-agent: * Disallow: /

Best Practices

Always test your robots.txt before deploying

Use Google Search Console's robots.txt Tester to verify your rules work as expected. A misconfigured file can accidentally block important pages from being indexed.

Don't use robots.txt for security

Robots.txt is publicly accessible and crawlers aren't required to follow it. Use proper authentication and access controls for truly sensitive content.

Include your sitemap URL

Adding a Sitemap directive helps search engines discover all your important pages, even if they're not directly linked from your homepage.

Be specific with your rules

Use specific paths rather than overly broad patterns. Blocking too much can harm your SEO, while being too permissive wastes crawl budget.

Monitor your crawl stats

Regularly check Google Search Console to see how crawlers interact with your site. Adjust your robots.txt based on actual crawling behavior.