Robots.txt Content

Test Configuration

🤖 Robots.txt Tips

📋 Basic Syntax

  • User-agent: Specifies which crawler the rules apply to
  • Disallow: Tells the crawler not to access specific URLs
  • Allow: Overrides a Disallow to permit access to specific URLs
  • Sitemap: Specifies the location of the XML sitemap
  • Crawl-delay: Sets time between crawler requests

🎯 Pattern Matching

  • * (wildcard): Matches any sequence of characters
  • $ (end anchor): Matches the end of the URL
  • /path/: Matches URLs starting with /path/
  • /*.pdf$: Matches all PDF files
  • /dir/*: Matches everything in a directory

⚠️ Best Practices

  • Always place robots.txt in the root directory
  • More specific rules take precedence over general ones
  • Allow rules override Disallow rules of the same length
  • Robots.txt is publicly accessible - do not use for security
  • Test your robots.txt before deploying to production
  • Use Google Search Console to validate your robots.txt