Infrastructure & Networking
What is a web crawler?
A web crawler, also called a spider, bot, or web robot, is an automated software program that systematically browses the web by following hyperlinks from page to page, fetching the content of each page it discovers, and processing that content for a specific purpose. Search engine crawlers, Googlebot, Bingbot, Yandexbot, crawl the web to discover, analyse, and index content for inclusion in search results. Other crawlers monitor websites for changes, check for broken links, gather research data, or perform competitive analysis.
The crawler’s basic operation is elegantly simple, start with a set of known URLs, fetch each URL’s content, extract links from the fetched content, add newly discovered links to the queue of URLs to fetch, and repeat indefinitely. This recursive link-following process allows crawlers to traverse the web’s link graph, starting from a small set of seed URLs and progressively discovering the billions of pages connected through hyperlinks.
Web crawlers are the mechanism through which search engines know what content exists on the web. A page that has never been crawled cannot appear in search results, regardless of how excellent its content is or how many people link to it. Googlebot’s crawl is the first step in Google’s pipeline, crawl, then index, then rank. Understanding how crawlers work, how they discover URLs, how they process redirects, how they respect crawl instructions, and how they can be managed, is foundational to technical SEO and to understanding how redirect signals propagate through search engine systems.
How web crawlers work
A web crawler operates through a continuous cycle of URL discovery, fetching, and processing, each step building on the previous to progressively expand the crawler’s knowledge of the web.
The crawl queue: the central data structure in any crawler implementation. The crawl queue contains URLs waiting to be fetched, ordered by priority. High-priority URLs, important pages from high-authority sites, recently updated content, URLs from submitted sitemaps, move to the front of the queue. Low-priority URLs, deep pages on low-authority sites, URLs discovered through low-quality links, wait at the back.
Googlebot’s crawl queue contains billions of URLs at any given time, managing prioritisation at this scale requires sophisticated algorithms that continuously reassess priority as new signals arrive. URLs from submitted XML sitemaps enter the queue immediately, direct submission accelerates indexation relative to waiting for organic discovery through link following.
URL fetching: the crawler makes HTTP requests to queued URLs, sending a request with its identifying user agent string and receiving the HTTP response. The crawler processes the response status code:
A 200 OK response indicates successful content retrieval, the crawler processes the response body for content and links.
A 301 permanent redirect response instructs the crawler to update its records, the redirected URL has permanently moved to the Location header destination. The crawler follows the redirect, crawls the destination, and initiates the process of updating its index.
A 302 temporary redirect response instructs the crawler to follow the redirect for this visit but keep the original URL in its records, the redirect is temporary and the original URL may resume serving content.
A 404 Not Found response indicates the URL does not exist, the crawler reduces crawl frequency for this URL and eventually removes it from the index if 404 persists.
A 410 Gone response explicitly indicates intentional permanent removal, the crawler removes the URL from the index more aggressively than a 404.
A 500 Server Error response indicates a temporary server problem, the crawler retries later.
Content processing: after fetching a URL’s content the crawler processes it:
Link extraction, parsing the HTML to find all hyperlinks, <a href> elements, and other URL references, canonical tags, hreflang annotations, sitemap references, redirect destinations. Extracted links are added to the crawl queue for future fetching.
Content analysis, extracting text content, page metadata, title, description, structured data markup, Schema.org, Open Graph, and other signals relevant to indexing and ranking.
Signal extraction, reading canonical tags, noindex directives, robots meta tags, and other crawl and index control signals.
Crawl scheduling: determining how frequently each URL should be recrawled. High-authority pages with frequently updated content are crawled more often. Low-authority pages with rarely changing content are crawled less often. The crawl schedule adapts based on observed change frequency, pages that change on every crawl are recrawled frequently, pages that remain stable between crawls are recrawled less often.
Types of web crawlers
Web crawlers serve diverse purposes, the major categories differ in their goals, operators, and appropriate handling.
Search engine crawlers: the most significant category for web operators. Googlebot, Bingbot, Yandexbot, Baidubot, and other search engine crawlers discover and index web content for inclusion in search results. Well-behaved search engine crawlers respect robots.txt directives, identify themselves through their user agent strings, and verify crawler identity through reverse DNS lookup. Welcoming search engine crawlers, providing clean crawlable content and well-configured redirect signals, is essential for search visibility.
SEO tool crawlers: commercial SEO platforms, Ahrefs, Semrush, Moz, Majestic, operate crawlers that build link databases and content indices for SEO analysis tools. SEO tool crawlers identify themselves through their user agent strings, AhrefsBot/7.0, SemrushBot/7~bl: and generally respect robots.txt. Web operators may choose to allow or block these crawlers based on whether they want their link profile and content included in commercial SEO tool databases.
Monitoring and uptime crawlers: automated monitoring services that regularly check URLs to verify availability and correct functioning. UptimeRobot, Pingdom, and similar services use HTTP clients that may identify themselves as monitoring agents. These crawlers make periodic requests to configured URLs and alert operators when unexpected responses are received. For redirect management infrastructure monitoring crawlers verify that redirect responses are correctly served.
Research crawlers: academic and research organisations operate crawlers for web research, studying link structure, content distribution, and web evolution. The Common Crawl project operates a public crawler that creates open datasets of web content, its crawls are used in academic research and AI training. Research crawlers identify themselves and typically respect robots.txt.
Archive crawlers: the Internet Archive’s Heritrix crawler crawls the web to preserve historical snapshots of web content. The Wayback Machine, web.archive.org: serves these preserved snapshots. Archive crawlers identify themselves as ia_archiver in their user agent strings. Web operators can configure robots.txt to allow or block archive crawlers.
Malicious crawlers: automated programs that crawl websites for illegitimate purposes, harvesting email addresses, scraping content for republication, discovering vulnerabilities, or generating fake traffic. Malicious crawlers typically do not identify themselves accurately, they may use spoofed user agent strings resembling legitimate browsers or crawlers. They generally do not respect robots.txt. Web application firewalls and bot management systems detect and block malicious crawlers through behavioural analysis rather than relying on user agent identification.
Crawlers and robots.txt
The robots.txt file is the standard mechanism for communicating crawl permissions to web crawlers, well-behaved crawlers respect its directives before crawling any page on a site.
Robots.txt discovery: every web crawler fetches robots.txt at the root of each domain before crawling, https://example.com/robots.txt. The crawler reads the file and stores the permitted and disallowed paths for that domain. Subsequent crawl requests check the stored permissions, paths disallowed for the crawler’s user agent are not fetched.
Per-crawler directives: robots.txt supports user agent-specific directives, applying different rules to different crawlers. User-agent: Googlebot followed by disallow directives applies only to Googlebot. User-agent: AhrefsBot followed by different directives applies only to the Ahrefs crawler. User-agent: * applies to all crawlers not specifically named. This specificity allows operators to welcome search engine crawlers while blocking commercial SEO tool crawlers, or to apply different crawl restrictions to different bots.
Crawlers that ignore robots.txt: malicious crawlers ignore robots.txt entirely, the file is only respected by well-behaved crawlers. Blocking malicious crawlers requires technical measures, IP blocking, rate limiting, CAPTCHA challenges, at the web server or CDN layer rather than relying on robots.txt compliance.
Crawlers and redirects
Redirects are signals specifically intended for search engine crawlers, understanding how crawlers process redirects clarifies why redirect implementation decisions have lasting SEO consequences.
Redirect discovery: search engine crawlers discover redirect configurations by crawling redirect source URLs and receiving redirect responses. A 301 redirect configured today takes effect for search engines only when Googlebot next crawls the redirect source URL, which may be hours, days, or weeks depending on the URL’s crawl frequency. Crawl frequency is a function of the URL’s perceived importance and the domain’s crawl budget.
Redirect signal processing: when Googlebot receives a 301 redirect response it:
Follows the redirect to the destination URL. Crawls the destination URL. Initiates the process of updating its index, gradually de-indexing the redirect source URL and transferring its accumulated SEO equity to the destination. Adds the redirect relationship to its internal records, subsequent crawls of the source URL reinforce the redirect signal.
This process is gradual, the index update happens over multiple crawl cycles rather than immediately. A site migration with correctly configured 301 redirects may take weeks for Google to fully process and update its index from old to new URLs.
Redirect chain following: search engine crawlers follow redirect chains, sequences of multiple redirects, up to a limit. Googlebot follows redirect chains up to approximately 5 hops, longer chains may not be fully processed. Each hop in a chain consumes crawl budget and loses some link juice. Collapsing redirect chains to direct single-hop redirects is a crawl efficiency optimisation.
Noindex and crawlers: a noindex directive on a redirect source page creates a conflict, the redirect signals the page has permanently moved while the noindex signals not to index it. Crawlers generally follow the redirect rather than the noindex, the redirect is the stronger signal. Redirect source pages do not need noindex directives, the redirect itself communicates that the source URL is not the canonical destination.
Managing crawler access
Web operators have several tools for controlling how crawlers interact with their sites, balancing discoverability, server load, and content access.
robots.txt for crawl guidance: directing crawlers toward valuable content and away from low-value URL spaces. Blocking URL parameter patterns that generate duplicate content: session IDs, tracking parameters, prevents crawl budget waste on redundant pages. Blocking admin and utility pages prevents crawlers from discovering and attempting to crawl authenticated or sensitive areas.
XML sitemaps for discovery acceleration: submitting XML sitemaps through Google Search Console provides crawlers with a direct list of canonical URLs to crawl, accelerating discovery of important pages beyond what link-following would achieve. Sitemaps should contain only canonical HTTPS URLs, never redirect sources or URL parameter variants.
Crawl rate management: high-traffic crawling can affect server performance, particularly for origin servers without CDN caching. Google Search Console allows reducing Googlebot’s crawl rate for domains where crawling is causing server load issues. For most sites default crawl rates are appropriate, reducing crawl rate should only be considered when Googlebot crawling demonstrably affects performance.
Crawler detection in analytics: filtering crawler traffic from analytics data provides accurate user behaviour metrics, crawler requests are not user interactions and should not be included in session counts, bounce rates, or conversion data. Analytics platforms provide bot filtering options, enabling known crawler filtering automatically excludes recognised crawler user agent strings from analytics data.
Responsible crawling
Well-implemented web crawlers follow conventions that make them good citizens of the web, respecting site preferences and avoiding excessive load on crawled servers.
Crawl delay: limiting request frequency to avoid overwhelming crawled servers. Search engine crawlers implement automatic crawl rate adaptation, backing off when servers respond slowly or with errors. The Crawl-delay directive in robots.txt requests a minimum delay between requests from a specific crawler, though Googlebot does not honour Crawl-delay, preferring to manage its own crawl rate through Search Console settings.
Conditional requests: using ETag and Last-Modified headers to make conditional requests, If-None-Match and If-Modified-Since: that receive 304 Not Modified responses for unchanged content. Conditional requests reduce bandwidth consumption for recrawls, the crawler receives confirmation that cached content is still current without downloading the full response body again.
Identifying through user agent: clearly identifying themselves through user agent strings so web operators can distinguish crawler traffic from user traffic in logs and analytics, and so operators can configure appropriate access policies in robots.txt.