XML Sitemap & robots.txt Setup
Discovery, crawling and indexing: robots.txt, sitemaps, canonicalization, crawler scheduling and measuring document availability.
Crawling and indexing are different processes. A robot discovers a URL, chooses when to visit it, receives the HTTP response and extracts the content. The search engine then decides which version of the document to store and use. A 200 OK response, a sitemap entry and a robot visit are not confirmation of indexing [1].
The pipeline and URL sources
Section titled “The pipeline and URL sources”Links and sitemaps → URL queue → robots.txt → fetch → render → extraction → canonicalization → index. The stages may run asynchronously; the published scheme describes functions, not the exact microservice graph of a particular operator.
A site is represented as a directed graph : vertices are URLs, edges are reachable links. Seed URLs come from sitemaps, external links and earlier visits. Filter parameters can generate an enormous set of URLs from a small number of distinct documents.
| Mechanism | Purpose | Limitation |
|---|---|---|
| robots.txt | Rules for automated fetching | Not authentication, and no guarantee of removal from the index |
| Sitemap | Announces that URLs exist and have changed | Not an obligation to index |
noindex |
Indexing directive | The robot has to fetch the page to read it |
| canonical | Signal of the preferred version | The search engine may choose differently |
| HTTP status | State of the fetched resource | Not a relevance judgement |
Standards and algorithms
Section titled “Standards and algorithms”RFC 9309 defines the Robots Exclusion Protocol: user-agent groups, path matching, error handling and caching [2]. It is important to check the most specific matching rule and the URL encoding. Private information is protected with authorization, because robots.txt is public and does not stop an arbitrary client.
A sitemap lists canonical URLs, with correct XML escaping and information about significant changes. The specification limits one file to 50,000 URLs and 50 MB uncompressed; larger sets are split with a sitemap index [3]. lastmod reflects a change to the page, not the time the sitemap was regenerated. Support for additional tags depends on the operator.
Rules for search access and for use in model training must not be merged automatically: operators have different tokens and products. A specific robot profile should cite the owner’s current documentation. Support for the common REP does not prove that every client follows the same policy.
A mathematical model of crawling
Section titled “A mathematical model of crawling”For the target set of pages , the pages verifiably fetched and those observed in the index :
These are definitions of audit metrics. The second set is often only partly known, so the report must state the source of each observation and the unknown cases.
Under a Poisson model of change with rate , the probability that a copy is stale after time is:
It helps to model recrawling; a constant rate is a simplification that does not fit sudden releases without adaptation. Google describes the crawl budget in terms of crawl capacity and crawl demand, not a fixed universal quota [4].
How Answerwell applies it
Section titled “How Answerwell applies it”Our own robots reproduce discovery, access rules and document processing; ML models estimate the risk of unavailability and the delay before a page is fetched again. Training uses the sources and computational experiments described in the methodology. Similarity to an external robot is measured on specific observable outputs.
Validation needs separate groups of new product cards, categories, discontinued products and parameterized URLs. Splitting by time and template prevents the model from memorizing near-identical pages. A good delay model does not mean the internal policy of the whole search index has been reconstructed.
Protocol and example
Section titled “Protocol and example”- Record the register of target URLs, sitemaps, rules and server logs.
- For each URL, check the status, redirect chain, directives and extracted text.
- Fix the chosen group and keep a comparable control group.
- Compare coverage, the median and p90 of the visit delay, server errors and the available index information.
If 850 of 1,000 target pages are verifiably fetched, crawl coverage is 85%. If indexing information exists for only 200 of them, the other 800 cannot be counted as excluded. Blocking a noindex URL in robots.txt can stop the robot from reading the directive. Such contradictions call for investigation, not for resubmitting the sitemap more often.
Sources
Section titled “Sources”- Google Search Central. How Search works. Description of the stages.
- M. Koster, G. Illyes, H. Zeller, L. Sassman. RFC 9309, 2022. REP standard.
- Sitemaps.org. Sitemaps XML format. Specification.
- Google Search Central. Managing your crawl budget. Guide for large sites.
See also: crawler simulation, change notifications.