Back to Blog
    SEO Tools 7 min read

    Robots.txt Configuration Guide: Control What Search Engines Crawl

    February 22, 2026 Academy Team
    Share
    Robots.txt Configuration Guide: Control What Search Engines Crawl — AI SEO Mastery Academy

    Robots.txt is one of the most powerful — and most dangerous — files in SEO. A few lines of text control how search engines crawl your entire site, and a single misplaced directive can block Google from your best content or, worse, your whole domain. Every SEO professional needs to understand it cold. This article covers what robots.txt controls, the essential directives, and the mistakes that quietly wreck sites. For the complete setup, see our robots.txt configuration guide.

    What Robots.txt Controls

    Robots.txt tells crawlers which URLs they may or may not access. Crucially, it controls crawling, not indexing — a page blocked in robots.txt can still appear in the index if other pages link to it. To keep a page *out* of the index, use a noindex tag (and don't block it in robots.txt, or Google can't see the noindex). Confusing these two is the most common and costly robots.txt mistake.

    Essential Directives

    • User-agent: which crawler the rules apply to (`*` for all, or target specific bots)
    • Disallow: blocks crawling of specified paths
    • Allow: overrides Disallow for specific sub-paths
    • Sitemap: points crawlers to your XML sitemap
    • Crawl-delay: requests a delay between requests (ignored by Google)

    Common Configuration Patterns

    • Block admin areas, user dashboards, and internal search-result pages
    • Allow all public content directories
    • Block faceted-navigation parameters that create duplicate URLs
    • Point to your sitemap.xml
    • Allow AI crawlers (GPTBot, PerplexityBot) if you want AI visibility

    Dangerous Mistakes to Avoid

    • Accidentally disallowing `/` — blocks your entire site (often left over from staging)
    • Blocking CSS/JS files — prevents Google from rendering your pages correctly
    • Using robots.txt to 'hide' a page that's already indexed (use noindex instead)
    • Forgetting to update it after a migration
    • Deploying changes without testing them first in Search Console

    Test every change before it ships, and re-check robots.txt after any redesign or migration — these are exactly when it silently breaks.

    Frequently Asked Questions

    What does robots.txt do?

    It tells search-engine crawlers which parts of your site they may or may not crawl, using User-agent, Disallow, Allow, and Sitemap directives. It manages crawling, not indexing, and is mainly used to steer crawl efficiency.

    Does robots.txt keep a page out of Google's index?

    No. It blocks crawling, not indexing — a disallowed page can still be indexed if other pages link to it. To keep a page out of the index, use a noindex tag and don't block the page in robots.txt (or Google can't see the noindex).

    What's the most dangerous robots.txt mistake?

    Disallow: / — which blocks the entire site from crawling. It's commonly left in place accidentally after moving from staging to production and can deindex everything.

    Should I block CSS and JavaScript in robots.txt?

    Never. Google needs your CSS and JS to render and understand pages. Blocking them can make Google see a broken version of your site and hurt rankings.

    How do I test robots.txt changes?

    Use Google Search Console's robots.txt tester to verify your rules and check sample URLs from every major section before deploying, and re-test after any redesign or migration.

    📊 Try it on Vincony

    Site Audit Tool

    3 credits per audit • Free credits on signup

    Ready to apply what you've learned?

    Enroll free at AI SEO Mastery Academy and get Vincony credits to start using professional SEO tools immediately.