Robots.txt
A text file placed in the root directory of a website that instructs search engine crawlers which pages or sections to crawl or not crawl. A fundamental tool for managing crawl budget and controlling search engine access.
Why It Matters
Robots.txt helps search engines crawl your site efficiently by blocking unimportant pages (admin areas, duplicate content) and directing them to valuable content. Proper robots.txt usage improves crawl budget efficiency, prevents indexing of sensitive areas, and can speed up discovery of new content by up to 40%.
How It Works
Search engine crawlers check the robots.txt file before crawling any pages. The file uses directives like 'User-agent' to specify which bot, 'Disallow' to block URLs, and 'Allow' to permit specific paths. The file is located at yourdomain.com/robots.txt and uses specific syntax that crawlers understand.
Use Cases
- An e-commerce site blocks crawling of cart, checkout, and admin pages to save crawl budget for product pages
- A large site disallows crawling of search result pages and filtered URLs that create duplicate content
- A staging website uses robots.txt to block all crawlers while in development
Best Practices
- Block admin areas, shopping cart pages, and internal search results that waste crawl budget
- Don't block CSS, JavaScript, or images - Google needs these to understand pages properly
- Use robots.txt for crawl control, not for preventing indexing (use noindex meta tag instead)
- Include your sitemap.xml location in robots.txt to help crawlers discover it
- Test robots.txt changes with Google Search Console's robots.txt tester before deploying
- Remember robots.txt is publicly accessible - don't use it to hide sensitive information
Frequently Asked Questions
Why is Robots.txt important for SEO? +
How does Robots.txt work? +
What's the difference between robots.txt and noindex? +
Related Terms
Ensure AI crawlers can access what you want them to see
Monitor your AI visibility and avoid crawl blocking issues so your content is eligible to be discovered and cited by AI systems.
No credit card required • Start in minutes