[{"data":1,"prerenderedAt":498},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcrawler-and-robots":3,"docs-sib-\u002Fdocs\u002Fcrawler-and-robots":391,"docs-nav":472},{"id":4,"title":5,"body":6,"description":381,"extension":382,"meta":383,"navigation":384,"order":385,"path":386,"section":387,"seo":388,"stem":389,"__hash__":390},"docs\u002Fdocs\u002Fcrawler-and-robots.md","The crawler and robots.txt",{"type":7,"value":8,"toc":369},"minimark",[9,14,18,29,35,38,42,45,112,117,161,164,168,186,193,197,200,257,260,263,303,313,317,334,337,341,344,347,353,356,362],[10,11,13],"h2",{"id":12},"how-crawlstat-identifies-itself","How CrawlStat identifies itself",[15,16,17],"p",{},"Every request CrawlStat makes carries this user agent:",[19,20,26],"pre",{"className":21,"code":23,"language":24,"meta":25},[22],"language-text","CrawlStatBot\u002F1.0 (+https:\u002F\u002Fcrawlstat.com\u002Fbot)\n","text","",[27,28,23],"code",{"__ignoreMap":25},[15,30,31,34],{},[27,32,33],{},"CrawlStatBot"," is the name it answers to in robots.txt. The URL in brackets tells anyone reading their server logs where to find out what it is.",[15,36,37],{},"CrawlStat is a desktop app. When you see CrawlStatBot in your logs, it's a person running CrawlStat on their own computer, from their own internet connection, not a central service crawling the web. The requests come from that person's IP address.",[10,39,41],{"id":40},"robotstxt","robots.txt",[15,43,44],{},"CrawlStat respects robots.txt by default.",[46,47,48,60,72,85,97],"ul",{},[49,50,51,55,56,59],"li",{},[52,53,54],"strong",{},"One robots.txt per site."," Before fetching anything from a host, CrawlStat requests its ",[27,57,58],{},"\u002Frobots.txt"," and keeps it for the rest of the crawl. Each origin (scheme, host and port) gets its own, including external sites whose links are being checked.",[49,61,62,65,66,71],{},[52,63,64],{},"Disallow rules are obeyed."," A URL that robots.txt disallows isn't fetched. It's recorded as blocked, so it shows up in your results and in the ",[67,68,70],"a",{"href":69},"\u002Fdocs\u002Faudits\u002Fpages-blocked-by-robots-txt","Pages blocked by robots.txt"," audit when your own pages link to it.",[49,73,74,77,78,80,81,84],{},[52,75,76],{},"The most specific group wins."," If robots.txt has a group for ",[27,79,33],{},", CrawlStat follows that group. Otherwise it follows the ",[27,82,83],{},"*"," group.",[49,86,87,93,94,96],{},[52,88,89,92],{},[27,90,91],{},"Crawl-delay"," is honoured."," If the group CrawlStat follows sets a ",[27,95,91],{},", requests to that host are spaced at least that far apart, even if your own delay setting is shorter.",[49,98,99,102,103,106,107,111],{},[52,100,101],{},"Sitemap lines are used."," ",[27,104,105],{},"Sitemap:"," lines in robots.txt are read and their URLs added to the crawl. That's what lets CrawlStat find ",[67,108,110],{"href":109},"\u002Fdocs\u002Faudits\u002Forphan-pages","orphan pages",".",[113,114,116],"h3",{"id":115},"when-robotstxt-cant-be-read","When robots.txt can't be read",[118,119,120,133],"table",{},[121,122,123],"thead",{},[124,125,126,130],"tr",{},[127,128,129],"th",{},"robots.txt returns",[127,131,132],{},"CrawlStat does",[134,135,136,145,153],"tbody",{},[124,137,138,142],{},[139,140,141],"td",{},"200",[139,143,144],{},"Follows the rules in it.",[124,146,147,150],{},[139,148,149],{},"404 or 410",[139,151,152],{},"Treats the site as having no rules, and crawls everything. This is the standard behaviour.",[124,154,155,158],{},[139,156,157],{},"A 5xx error, or no response",[139,159,160],{},"Crawls anyway, and shows a warning.",[15,162,163],{},"The last row is a deliberate choice. The robots.txt standard (RFC 9309) says a server error should be treated as \"disallow everything\". CrawlStat is usually pointed at a site by the person who runs it, and refusing to crawl because their server hiccuped on one file wouldn't help anyone. The warning tells you it happened.",[113,165,167],{"id":166},"turning-robotstxt-off","Turning robots.txt off",[15,169,170,171,174,175,179,180,182,183,185],{},"You can turn off ",[52,172,173],{},"Respect robots.txt"," in ",[67,176,178],{"href":177},"\u002Fdocs\u002Fsettings","Settings",". CrawlStat then ignores Disallow rules and ",[27,181,91],{},". It still reads ",[27,184,105],{}," lines only while robots.txt is respected, so orphan detection works best with this left on.",[15,187,188,189,192],{},"This option exists for sites you own, for example a staging server that blocks every crawler with ",[27,190,191],{},"Disallow: \u002F",". It isn't for getting around someone else's rules.",[10,194,196],{"id":195},"how-hard-crawlstat-works-a-server","How hard CrawlStat works a server",[15,198,199],{},"The defaults are modest:",[118,201,202,212],{},[121,203,204],{},[124,205,206,209],{},[127,207,208],{},"Setting",[127,210,211],{},"Default",[134,213,214,222,233,241,249],{},[124,215,216,219],{},[139,217,218],{},"Simultaneous requests per host",[139,220,221],{},"5",[124,223,224,227],{},[139,225,226],{},"Delay between requests",[139,228,229,230,232],{},"None (unless robots.txt sets a ",[27,231,91],{},")",[124,234,235,238],{},[139,236,237],{},"Request timeout",[139,239,240],{},"20 seconds",[124,242,243,246],{},[139,244,245],{},"Retries on a timeout or connection error",[139,247,248],{},"2, waiting 0.5 s and then 1 s",[124,250,251,254],{},[139,252,253],{},"Redirects followed per URL",[139,255,256],{},"Up to 10",[15,258,259],{},"Error status codes such as 404 or 503 aren't retried. They're recorded as they are.",[15,261,262],{},"A few other behaviours keep the load down:",[46,264,265,271,277,283,289],{},[49,266,267,270],{},[52,268,269],{},"Pages are fetched with GET. Everything else is checked with HEAD."," Images, documents, stylesheets, scripts and external links only need a status and a size, so CrawlStat asks for headers, not the whole file. If a server doesn't support HEAD, it falls back to GET.",[49,272,273,276],{},[52,274,275],{},"External links are fetched once and never followed."," CrawlStat checks that a link to another site works, then stops.",[49,278,279,282],{},[52,280,281],{},"Large responses are cut off."," CrawlStat reads up to 10 MB of any response and stops there. The URL is marked as truncated, and links in the part that was read are still used.",[49,284,285,288],{},[52,286,287],{},"Each URL is fetched once."," CrawlStat normalises URLs and remembers what it's seen, so a link that appears on every page is fetched a single time.",[49,290,291,294,295,299,300,302],{},[52,292,293],{},"No JavaScript, unless you ask for it."," By default CrawlStat reads the HTML the server sends and never runs scripts, so it doesn't trigger the extra requests a browser would. With ",[67,296,298],{"href":297},"\u002Fdocs\u002Fyour-first-crawl#render-javascript","Render JavaScript"," on, each page is also loaded in a browser, which fetches the page again with its scripts, styles and any data they request, under the same ",[27,301,33],{}," user agent. Images aren't loaded, and at most four pages render at once.",[15,304,305,306,309,310,312],{},"If you're crawling a site you don't run, consider lowering ",[52,307,308],{},"Simultaneous requests"," and adding a delay in ",[67,311,178],{"href":177},". Your crawl will be slower, but it will be kinder to the site.",[10,314,316],{"id":315},"changing-the-user-agent","Changing the user agent",[15,318,319,320,322,323,326,327,330,331,111],{},"You can set a different user agent in ",[67,321,178],{"href":177},". CrawlStat then matches robots.txt using the first word of your new user agent, which is the part before the first ",[27,324,325],{},"\u002F"," or space. For example, ",[27,328,329],{},"MyAuditBot\u002F2.0"," is matched against rules for ",[27,332,333],{},"MyAuditBot",[15,335,336],{},"We recommend keeping the default for sites you don't run. An honest user agent lets site owners recognise the crawler and set rules for it.",[10,338,340],{"id":339},"for-site-owners","For site owners",[15,342,343],{},"If you've found CrawlStatBot in your logs, someone has used CrawlStat to check your site. Often it's someone on your own team, or an agency working for you.",[15,345,346],{},"To stop CrawlStat crawling your site, add this to your robots.txt:",[19,348,351],{"className":349,"code":350,"language":24,"meta":25},[22],"User-agent: CrawlStatBot\nDisallow: \u002F\n",[27,352,350],{"__ignoreMap":25},[15,354,355],{},"To slow it down instead:",[19,357,360],{"className":358,"code":359,"language":24,"meta":25},[22],"User-agent: CrawlStatBot\nCrawl-delay: 5\n",[27,361,359],{"__ignoreMap":25},[15,363,364,365,111],{},"CrawlStat obeys these rules by default. Because CrawlStat runs on each user's own computer, the user can change its settings, so for a hard guarantee use your server's normal access controls. If you're seeing behaviour that seems wrong, ",[67,366,368],{"href":367},"\u002Fcontact","let us know",{"title":25,"searchDepth":370,"depth":370,"links":371},2,[372,373,378,379,380],{"id":12,"depth":370,"text":13},{"id":40,"depth":370,"text":41,"children":374},[375,377],{"id":115,"depth":376,"text":116},3,{"id":166,"depth":376,"text":167},{"id":195,"depth":370,"text":196},{"id":315,"depth":370,"text":316},{"id":339,"depth":370,"text":340},"How CrawlStat identifies itself, how it reads and obeys robots.txt, how hard it works a server, and what site owners can do if they see CrawlStatBot in their logs.","md",{},true,16,"\u002Fdocs\u002Fcrawler-and-robots","Account & data",{"title":5,"description":381},"docs\u002Fcrawler-and-robots","WO6wcCjekUpyceF8UbE-9iOtIJiUr-hTwWxdECx0_h0",[392,396,399,403,406,409,413,417,421,425,429,433,437,441,445,447,451,455,459,460,464,468],{"title":393,"path":394,"order":395},"Client reports","\u002Fdocs\u002Fclient-reports",null,{"title":397,"path":398,"order":395},"UX testing","\u002Fdocs\u002Fux-testing",{"title":400,"path":401,"order":402},"Getting started","\u002Fdocs\u002Fgetting-started",1,{"title":404,"path":405,"order":370},"Installing CrawlStat","\u002Fdocs\u002Finstalling",{"title":407,"path":408,"order":376},"Your first crawl","\u002Fdocs\u002Fyour-first-crawl",{"title":410,"path":411,"order":412},"Watching a crawl","\u002Fdocs\u002Fwatching-a-crawl",4,{"title":414,"path":415,"order":416},"The Pages table","\u002Fdocs\u002Fresults-table",5,{"title":418,"path":419,"order":420},"Issues","\u002Fdocs\u002Fissues",6,{"title":422,"path":423,"order":424},"The plan","\u002Fdocs\u002Fthe-plan",7,{"title":426,"path":427,"order":428},"Journeys","\u002Fdocs\u002Fjourneys",8,{"title":430,"path":431,"order":432},"Competitor Intelligence","\u002Fdocs\u002Fcompetitor-intelligence",8.7,{"title":434,"path":435,"order":436},"Accessibility","\u002Fdocs\u002Faccessibility",9,{"title":438,"path":439,"order":440},"Comparing crawls","\u002Fdocs\u002Fcomparing-crawls",10,{"title":442,"path":443,"order":444},"Projects","\u002Fdocs\u002Fprojects",11,{"title":178,"path":177,"order":446},12,{"title":448,"path":449,"order":450},"Keyboard shortcuts","\u002Fdocs\u002Fkeyboard-shortcuts",13,{"title":452,"path":453,"order":454},"Open source and licence","\u002Fdocs\u002Flicensing",14,{"title":456,"path":457,"order":458},"Privacy and your data","\u002Fdocs\u002Fprivacy-and-data",15,{"title":5,"path":386,"order":385},{"title":461,"path":462,"order":463},"Local AI","\u002Fdocs\u002Flocal-ai",17,{"title":465,"path":466,"order":467},"Troubleshooting","\u002Fdocs\u002Ftroubleshooting",18,{"title":469,"path":470,"order":471},"FAQ","\u002Fdocs\u002Ffaq",19,[473,474,475,477,478,479,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,497],{"title":393,"path":394,"section":395,"order":395},{"title":397,"path":398,"section":395,"order":395},{"title":400,"path":401,"section":476,"order":402},"Start here",{"title":404,"path":405,"section":476,"order":370},{"title":407,"path":408,"section":476,"order":376},{"title":410,"path":411,"section":480,"order":412},"Using CrawlStat",{"title":414,"path":415,"section":480,"order":416},{"title":418,"path":419,"section":480,"order":420},{"title":422,"path":423,"section":480,"order":424},{"title":426,"path":427,"section":480,"order":428},{"title":430,"path":431,"section":480,"order":432},{"title":434,"path":435,"section":480,"order":436},{"title":438,"path":439,"section":480,"order":440},{"title":442,"path":443,"section":480,"order":444},{"title":178,"path":177,"section":480,"order":446},{"title":448,"path":449,"section":480,"order":450},{"title":452,"path":453,"section":387,"order":454},{"title":456,"path":457,"section":387,"order":458},{"title":5,"path":386,"section":387,"order":385},{"title":461,"path":462,"section":387,"order":463},{"title":465,"path":466,"section":496,"order":467},"Help",{"title":469,"path":470,"section":496,"order":471},1793827598117]