Sub topic 10
Letting the Right Crawlers Reach Your Content
Assume you know basic HTML and have edited web content before. This chapter focuses on robots.txt, crawler access, and testing. It does not cover writing the page passages themselves.
Which crawlers should reach your pages?
A crawler is a program that requests web pages and follows links. Search engines use crawlers to discover and index pages. AI answer systems may also use crawlers to collect content for search, retrieval, or citation.
First decide which access you want:
- Allow search crawlers to discover public documentation.
- Allow an AI search crawler if its service is part of your distribution plan.
- Block private, administrative, or staging paths.
- Avoid blocking assets that a crawler needs to understand the page.
Crawler names are controlled by their vendors. Names and policies can change, so check each vendor's current documentation before adding a rule. A rule for one crawler does not automatically control another crawler.
How `robots.txt` controls access
A robots.txt file is a plain-text policy at the root of a host, such as https://example.com/robots.txt. It gives instructions to crawlers using User-agent, Allow, and Disallow directives.
This example allows several named crawlers to access public content while blocking an administrative path for all other crawlers:
User-agent: OAI-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: *
Disallow: /admin/
Disallow: /staging/
Sitemap: https://example.com/sitemap.xmlUser-agent selects a crawler group. Allow: / permits the whole site. Disallow: /admin/ blocks URLs whose paths begin with /admin/. Sitemap points crawlers to a list of important URLs.
A more specific matching group can produce unexpected results if you assume that the wildcard group applies to every crawler. Review the file as a set of groups, and test the paths that matter.
Protect private content separately
robots.txt is not authentication. It is a request that cooperative crawlers follow. It does not prevent a person or an unwanted bot from requesting a URL.
Use authentication, authorization, network controls, or application-level access checks for confidential content. Do not place secrets in a page and rely on Disallow to hide them.
A noindex directive also has a different purpose. It asks an indexing system not to include a page in its index. The crawler usually must fetch the page before it can see that directive. Therefore, blocking a page in robots.txt can prevent the crawler from seeing a page-level noindex instruction.
Test the deployed file
Check the exact host and protocol that serve the content. A file at www.example.com/robots.txt does not automatically control example.com/robots.txt. Redirects, content delivery networks, and application routes can also return the wrong file.
Use an HTTP request to inspect the live response:
curl --fail --location --silent --show-error https://example.com/robots.txtVerify that the response is successful, plain text, and contains the intended rules. Then test representative URLs with the crawler's official testing tools when available. Test both allowed documentation pages and blocked administrative paths.
A practical access review
Review access whenever you publish a new section, move a URL, change a deployment host, or update a crawler policy. Keep private paths protected by real access controls, and keep public answer pages reachable without unnecessary barriers.
Exercise
A documentation page is public, but an AI search crawler cannot retrieve it. What should you check first?
Show answer
Fetch the live robots.txt file on the exact host, confirm that the crawler's user-agent is not disallowed for the page path, and check redirects or authentication that might block the request.