Skip to main content

    robots.txt (Developer Guide)

    robots.txt is the gatekeeper of crawling. Done right, it reduces crawl waste; done wrong, it can block your entire site.

    1) robots.txt is not noindex

    • Disallow blocks crawling
    • noindex blocks indexing (meta robots / X-Robots-Tag)

    2) A practical template

    text
    User-agent: *
    Disallow: /admin
    Disallow: /api
    
    Allow: /assets/
    
    Sitemap: https://example.com/sitemap.xml

    Avoid blocking important CSS/JS—Google may fail to render content correctly.

    3) Fast workflow with our generator

    1. Open robots.txt Generator and pick paths to block.
    2. Review for accidental blocks (assets, important pages).
    3. Publish it at `/robots.txt` on your domain.

    More: Indexability checklist

    Related tools

    FAQ

    Common robots.txt mistakes and misconceptions.