Robots.txt Builder & Tester

Create and validate robots.txt files visually. Control search engine crawling, block specific paths, add sitemaps, and test your robots.txt rules. Perfect for SEO and website optimization.

0
Total Rules
0
User-Agents
0
Allow Rules
0
Disallow Rules

Upload existing robots.txt file to edit

Supports .txt files (max 1MB)

Quick Presets

Crawl Rules

Advanced Options
Specify delay between requests for crawlers (supported by some bots)
Preferred domain for your site (non-standard, but supported by some crawlers)
Ignore URL parameters (format: param /path/)
Add your XML sitemap location

✅ Validation Results

Generated robots.txt


                
              

📋 Common Rule Examples

Disallow entire site: Disallow: /
Block admin area: Disallow: /admin/
Block private folder: Disallow: /private/
Allow specific file: Allow: /public/
Block URL parameters: Disallow: /*?
Block specific bot: User-agent: BadBot

What is robots.txt?

Robots.txt is a text file that tells search engine crawlers which pages or files they can request from your site. It's used to prevent overloading your site with requests and to block private or duplicate content from appearing in search results.

Common Directives

  • User-agent: Which crawler the rule applies to
  • Disallow: Block access to URLs
  • Allow: Allow access to specific URLs
  • Sitemap: Location of XML sitemap
  • Crawl-delay: Wait time between requests

Important Notes

  • ✅ robots.txt is publicly visible
  • ✅ Rules are case-sensitive
  • ✅ Use * as wildcard for any path
  • ✅ Use $ to match end of URL
  • ✅ Place sitemap at the bottom
  • ✅ Test after deployment

User-Agents

  • * - All crawlers
  • Googlebot - Google
  • Bingbot - Bing
  • Slurp - Yahoo
  • DuckDuckBot - DuckDuckGo
  • Baiduspider - Baidu
  • Yandex - Yandex

📖 About robots.txt

The robots.txt file, also known as the Robots Exclusion Protocol, is a text file that webmasters create to instruct web robots (typically search engine robots) how to crawl pages on their website. It's one of the most fundamental tools for SEO and website management.

đŸŽ¯ Why robots.txt Matters

  • Crawl Budget: Direct crawlers to important pages and away from duplicate content
  • Resource Protection: Prevent crawlers from overloading your server
  • Privacy: Block search engines from indexing private areas
  • Duplicate Content: Prevent indexing of parameter-based duplicate URLs
  • Sitemap Discovery: Help crawlers find your XML sitemap

⚡ How robots.txt Works

When a search engine crawler visits a website, it first checks for a robots.txt file at the root (e.g., https://example.com/robots.txt). It then reads the instructions and follows the rules specified for that crawler.

🔄 Syntax Rules

Directive Example Description
User-agent User-agent: * Applies rules to all crawlers
Disallow Disallow: /admin/ Prevents access to /admin/ folder
Allow Allow: /public/ Allows access to /public/ folder
Sitemap Sitemap: https://example.com/sitemap.xml Points to XML sitemap location
Crawl-delay Crawl-delay: 10 Wait 10 seconds between requests

❓ Frequently Asked Questions

Does robots.txt hide pages from search results?

No, robots.txt prevents crawling, not indexing. If other sites link to a blocked page, it might still appear in search results without a description. For complete removal, use noindex meta tags or password protection. robots.txt is like a "no entry" sign for crawlers, but the page can still be discovered through other means.

How do I block all search engines?

Use this simple rule:

User-agent: *
Disallow: /

This tells all crawlers not to access any part of your site. Useful for staging environments or development sites.

Can I use regular expressions in robots.txt?

The robots.txt protocol supports basic pattern matching with wildcards:

  • * - Matches any sequence of characters (Google-specific extension)
  • $ - Matches the end of the URL

Example: Disallow: /*.pdf$ blocks all PDF files.

Note: Not all crawlers support these extensions.

What's the difference between Allow and Disallow?

Disallow prevents access, Allow permits access. In case of conflicts, the most specific rule wins. For example:

User-agent: *
Allow: /public/
Disallow: /

This blocks everything except the /public/ folder. Always list more specific rules first.

How do I check if my robots.txt works?

Use these methods:

  • Google Search Console's robots.txt tester
  • Visit yoursite.com/robots.txt directly
  • Our validation panel shows potential issues
  • Third-party robots.txt checkers online