Robots.txt validator

What is robots.txt?

A robots.txt file is a text file that webmasters use to communicate with web crawlers/robots. It tells search engines which pages or sections of a website they can or cannot access. Located at the root of your website (e.g., www.example.com/robots.txt), it's one of the first things search engines check when visiting your site.

Common Mistakes That Block Search Engines

Incorrect Syntax

# Wrong
Disallow /blog/
# Correct
Disallow: /blog/

Missing the colon after Disallow can make the rule invalid, potentially blocking unintended content.

Accidentally Blocking Entire Site

User-agent: *
Disallow: /

This configuration blocks ALL search engines from your ENTIRE website. It's sometimes accidentally left in place after development or testing.

Wrong Capitalization

# Wrong
user-agent: googlebot
# Correct
User-agent: Googlebot

While some search engines may be forgiving, it's best practice to use proper capitalization.

Critical Consequences of Incorrect robots.txt

1. Loss of Search Traffic

2. Indexing Issues

3. Wasted Crawl Budget

Common High-Risk Scenarios

Development to Production Transfer

# Development robots.txt
User-agent: *
Disallow: /

# Forgotten to change when going live!

Always verify robots.txt after moving from development to production.

Partial Content Blocking

# Blocks all URLs containing 'category'
Disallow: */category*

This overly broad rule might block important category pages and their products.

Media and Resource Blocking

Disallow: /wp-content/uploads/

Blocking access to image directories prevents images from appearing in Google Images.

Best Practices to Prevent Issues

1. Regular Monitoring

  • Check robots.txt monthly
  • Verify after site updates
  • Monitor search console for crawl errors

2. Testing Before Deployment

3. Documentation

Recovery Steps If You've Blocked Search Engines

1. Immediate Actions

2. Monitoring

3. Future Prevention

Essential robots.txt Patterns

Allow Everything (Default)

User-agent: *
Disallow:

Block Sensitive Areas

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

Specific Search Engine Rules

User-agent: Googlebot
Allow: /googlebots-only/

User-agent: Bingbot
Allow: /bing-only/