A web crawler is an automated program that systematically discovers and downloads web resources by following links from one URL to the next. It starts from a set of known addresses, fetches each page, extracts new links and sitemap entries, and schedules those for later visits. Search engines run the best-known crawlers, such as Googlebot, to build the collections of pages their indexes are drawn from. Other crawlers power archive projects, site monitoring, security scanning and content aggregation. Google's own documentation distinguishes crawlers, which browse automatically from site to site, from fetchers, which retrieve a single resource because a user asked for it.
A crawler is also called a spider. It is a type of bot, but not every automated bot discovers pages by following links. A crawler is a discovery and retrieval mechanism; what happens to the fetched content afterwards, whether indexing, archiving or data extraction, is a separate step performed by other software.
URL Discovery and Fetching
Crawlers start from known URLs, discovered links and sitemaps. A common sitemap format is XML containing URL locations and optional modification dates. The sitemap protocol limits a file to 50,000 URLs and 50 MB uncompressed; an index can reference multiple files. Submission helps discovery but does not guarantee crawling or indexing.
Fetching is ordinary HTTP. The crawler sends a GET request with a User-Agent header that identifies it, follows redirects, and stores the response along with headers such as status code, content type and last-modified date. Crawlers impose response-size and timeout limits rather than downloading arbitrarily large resources. Some also render pages in a browser engine so that script-generated content becomes visible. That requires additional processing and may trigger separate CSS, JavaScript and data requests; a plain HTML crawler may miss those results.
Each fetched page yields new links. The crawler normalizes them, discards duplicates and URLs it has decided not to visit, and adds the rest to a queue called the frontier. How the frontier is ordered determines what gets crawled first and how deep the crawler goes into a site.
Crawl Scheduling and Access Rules
Web crawling has to balance coverage, freshness and politeness. A large or rapidly changing site can have more URLs than a crawler’s budget permits it to refetch daily, so schedulers prioritize by estimated importance and by how often a page has changed in the past. Google describes its crawl rate as algorithmic: Googlebot decides which sites to visit, how often and how many pages to fetch, slows down when a server returns errors such as HTTP 500, with its rate depending on the site and available capacity. Site owners can observe this behaviour in server logs and crawl statistics reports.
robots.txt
The Robots Exclusion Protocol, standardized in RFC 9309, lets a site publish crawl rules in a plain-text file at the top level of the host. Groups of rules start with user-agent lines naming a crawler's product token, followed by allow and disallow directives matched against URL paths. When several rules match, the most specific one wins, and an equal allow and disallow resolves to allow. RFC 9309 also specifies caching and error handling. A missing file does not mean the same thing as an unreachable server. Implementations should follow the relevant rules rather than treating every failed fetch as permission to crawl.
RFC 9309 is explicit that these rules are not a form of access authorization and are not a substitute for content security. Compliance is voluntary. Google states that its common crawlers obey robots.txt for automatic crawls, while some special-case crawlers operate under separate agreements with site owners. A crawler written by anyone else may ignore the file entirely. Keeping a resource private requires real controls such as authentication, and listing a path in robots.txt actually advertises its existence.
Identification and verification
Because the User-Agent string is trivially forged, operators who want to treat a search engine crawler differently should verify it. Google’s DNS method checks the reverse hostname against its documented crawler domains and then resolves that hostname forward, confirming that it returns the original IP. Alternatively, compare the address against the appropriate published crawler IP ranges. A reverse lookup alone is insufficient. A request claiming to be Googlebot from an unverified address should be handled like any other automated client.
Crawling vs Indexing and Scraping
Three activities are often blurred together.
| Activity | What it does | Who performs it | Output |
|---|---|---|---|
| Crawling | Discovers URLs and fetches resources by following links | Crawler | Stored copies of pages and a frontier of new URLs |
| Indexing | Analyses fetched content, picks a canonical among duplicates, stores it for retrieval | Indexing pipeline | A searchable index |
| Scraping | Extracts specific fields from chosen pages into structured data | Scraper | Datasets such as prices, listings or contact details |
Google describes crawling, indexing and serving as distinct stages and states that not every page it processes will be indexed. A page can be crawled and then dropped because it duplicates another, carries a noindex directive or is judged low quality. The reverse is also true: a URL blocked by robots.txt is not crawled, yet it can still appear in results, typically without a description, when other pages link to it. A noindex directive must be accessible to the crawler to work. Blocking the same URL in robots.txt can prevent it from reading that directive. Authentication is the appropriate boundary for private content.
Crawling vs scraping is a difference of purpose and breadth. A crawler focuses on discovering and retrieving pages, often parsing their links along the way. A scraper focuses on extracting particular values, whether its target pages are known in advance or discovered during the run. Scrapers often contain a small crawling component to find the pages they need, and a crawler may feed a scraper, which is why the two are conflated. Calling a program a crawler or scraper does not establish permission to access a resource.
Where Crawlers Are Used
Search crawlers keep indexes current; web archives preserve snapshots; site-audit tools report broken links, redirect chains and missing metadata. Security teams discover endpoints before authorized testing, while aggregation services pass retrieved pages to extraction software. Each use needs decisions about coverage, freshness and server load.
Limitations and Considerations
A crawler sees only what it can fetch. Content behind logins, forms, paywalls or interactive flows is usually invisible, and JavaScript-heavy sites require rendering that is expensive at scale. Infinite URL spaces such as calendars or faceted navigation can trap a naive crawler in endless near-duplicate pages, so real crawlers set depth and parameter limits. Rendering, link extraction and politeness delays all mean a full crawl of a large site takes time, and the result is a snapshot that starts going stale the moment it is complete.
From the site's side, crawl traffic consumes bandwidth and server capacity, and poorly behaved crawlers are a common cause of load problems. Operators manage this with robots.txt rules, rate limits, caching and bot management systems that classify automated clients. Those systems are imperfect, and a legitimate crawler can be slowed or blocked by mistake, which in turn affects how fresh its downstream index is. A useful crawl record therefore includes timestamps, response codes and excluded URLs, not just a list of downloaded pages. Missing content can indicate an access restriction, a rendering limitation, a scheduling choice or an error; those causes call for different responses.