Robots.txt checker
Read any site's robots.txt as the crawlers see it — the directives it sets, the paths it blocks, and the sitemaps it points to.
Robots.txt, explained
10 entriesA robots.txt file is a simple text file that tells search engine crawlers which URLs they can access on your site. It's important for SEO because it helps manage your crawl budget by preventing bots from wasting time on unimportant pages, protects sensitive areas like admin panels, and guides search engines to focus on your most valuable content. However, it's not a security measure - use noindex or password protection for truly private content.
The robots.txt file must be placed in the root directory of your website (e.g., https://example.com/robots.txt). It cannot be in a subdirectory or subfolder, as search engine bots only look for it at the domain root. If placed elsewhere, crawlers won't find it and will ignore your directives.
The main directives include: User-agent: Specifies which crawler the rules apply to (e.g., 'Googlebot' or '*' for all) Disallow: Blocks access to specific paths or directories Allow: Permits access to paths within disallowed directories Sitemap: Points crawlers to your XML sitemap location Crawl-delay: Sets delay between requests (not supported by Googlebot)
Common errors include: placing the file in wrong location (must be in root directory), syntax mistakes like missing colons or incorrect spacing, accidentally blocking important CSS/JavaScript files needed for proper rendering, using overly broad wildcards that block more than intended, and forgetting to remove 'Disallow: /' from staging sites when going live. Always test your robots.txt file before deploying.
No, robots.txt cannot completely hide pages from search engines. While it prevents crawling, search engines might still index URLs if they find links to those pages from other websites. The URL and anchor text can still appear in search results. For true privacy, use 'noindex' meta tags, password protection, or serve a 401/403 HTTP status code.
Wildcards allow flexible pattern matching: * (asterisk): Matches any sequence of characters $ (dollar sign): Matches the end of a URL Examples: 'Disallow: /*.pdf' blocks all PDF files, 'Disallow: /*?print=*' blocks URLs with print parameters, 'Disallow: /admin*' blocks all admin-related paths. Use wildcards carefully as they can inadvertently block important content.
Generally no. While it might seem logical to block external CSS and JavaScript files, Google needs access to these files to properly render and understand your pages. Blocking them can cause Google to see your pages incorrectly, potentially affecting your search rankings. Only block CSS/JS files if they're not essential for page rendering or contain sensitive information.
Use testing tools like Google Search Console's robots.txt Tester, online validators, or tools like Screaming Frog SEO Spider. These help verify syntax, check if specific URLs are blocked, and ensure your directives work as intended. Always test in a staging environment first, especially when using wildcards or complex rules.
robots.txt controls crawling at the file level before pages are accessed, while meta robots tags control indexing after pages are crawled. robots.txt says 'don't visit these pages,' while meta robots says 'don't show these pages in search results.' Use robots.txt for crawl budget management and meta robots for indexing control. They can work together but serve different purposes.
Update your robots.txt file when: launching new site sections, changing URL structure, identifying crawl budget issues, adding new tools or admin areas, or after security audits. Review it quarterly or after major site changes. Search engines typically check robots.txt regularly, so changes take effect quickly. Monitor your crawl reports to ensure changes work as expected.