To respect robots.txt, a crawler has to do four things: read the file the way the 2022 standard says to read it, wait as long between requests as each site asks, say who it is, and leave a site alone when the site turns it away. The usual advice hands the first job to Python's built-in robots.txt reader, which until May 2026 let a crawler in on five kinds of line a site wrote to keep it out. In tests I ran on November 4, 2026, the newest stable release, Python 3.15.2, still let it in on two of those five and on one more the tests turned up.

I build data systems for small businesses at Pioneer AI & Data, and collecting public data a business can use is part of the AI and data work. This post is the checklist I use. The counts come from Pioneer Pennant Process, my college softball recruiting app, which keeps its coach lists current by reading colleges' public athletics pages. Its crawler was built to take no for an answer.

The pages that rank for this question are mostly crawling-tool documentation that turns robots.txt on with one setting, guides with sample code for Python's built-in reader, and a paragraph on whether scraping is legal. None of the tool or vendor pages in those results tests the reader underneath.

What it means to respect robots.txt

Respecting robots.txt means treating a site's written crawling rules as binding on your crawler, even though nothing forces you to follow them. A crawler is a program that reads web pages on its own, and a robots.txt file is a short text file at the root of a site, such as example.com/robots.txt, that lists which paths a crawler may read and which it should leave alone. The rules have had a written standard since September 2022, when the IETF published RFC 9309, and the standard says plainly that "these rules are not a form of access authorization." A robots.txt file is a request, not a lock, so whether it is respected is up to whoever runs the crawler.

The site owner's side of the same file, deciding which crawlers to let in, is covered in what your website needs to get found by AI assistants. This post is the other side: what your crawler owes the sites it reads.

The polite crawler checklist: seven checks before a page is read

A polite crawler makes seven checks, and all of them happen before it reads the page it came for.

  1. Read robots.txt first, before any other page on the site. Read it once per site per run, and read it fresh: RFC 9309 says a crawler should not trust a saved copy older than 24 hours.
  2. Match the rules the way the standard does. The longest matching rule wins, an Allow beats a Disallow of the same length, * stands for any run of characters, $ marks the end of an address, and a blank line does not end a group of rules.
  3. Find the group written for your crawler. A group is a set of rules under a User-agent: line, which names the crawler the rules are for. A site that writes User-agent: YourBot/1.0 means your bot, and Google's robots.txt documentation reads googlebot/1.2 as googlebot.
  4. Keep the site's pace. Crawl-delay is not part of RFC 9309, and Google says it does not support Crawl-delay, but sites still write it. A polite crawler waits that long between requests to the site, uses a default when the site names none, and stays away from a site that asks for more than the crawler can honor.
  5. Say who you are. Send a name of your own with a link to a page that says what the crawler reads and how to stop it. RFC 9309 recommends most of that: the crawler's name should appear in what it sends, the identification string "SHOULD describe the purpose of the crawler," and the standard's own example links to a page about the bot.
  6. Check again when a page redirects to another site. The new site has its own rules and its own pace.
  7. Treat a closed door as a no. If robots.txt cannot be read, or the request for it is turned away, leave the site alone for the run. Check 7 is stricter than the standard, and a section below explains why it is still right.

Since October 26, 2026, every Pioneer Pennant Process script that reads another site goes through one fetch layer built on these seven checks. The layer names itself PioneerProcessBot, links to a public page about the crawler that explains how it behaves and how a school can make it stop, waits at least 5 seconds between page requests to any one site and longer when the site asks, and leaves alone any site that asks for more than 60 seconds.

Python's built-in robots.txt reader: five gaps before May 2026, three now

Python's built-in robots.txt reader, urllib.robotparser, let a crawler in on five kinds of line a site wrote to keep it out until Python 3.14.5 (May 10, 2026) and Python 3.13.14 (June 10, 2026), and the newest releases still let it in on two of the five. Three of the five are rules RFC 9309 spells out. The other two, a byte-order mark and a version number after the bot's name, are not covered by the standard word for word, but the site's meaning is plain, and Google's documentation reads both the way the site meant. A separate review of my crawler found the five gaps before the crawler shipped in October 2026, so the crawler got its own rule matcher, which reads robots.txt the same way on every Python version. On November 4, 2026, I re-ran the five cases on four versions of Python, serving each robots.txt from a test server on my own machine and reading it the way a crawler reads it.

A grid of six robots.txt lines meant to keep a crawler out, read by four Python versions on November 4, 2026. Python 3.9.6 and 3.13.7 let the crawler in on all six. Python 3.14.10 and 3.15.2 keep it out on three, a wildcard Disallow rule, a blank line inside a group, and longest-match order, and still let it in on three: a byte-order mark, a version number after the bot's name, and a wildcard print=true rule copied from a university athletics site.
A grid of six robots.txt lines meant to keep a crawler out, read by four Python versions on November 4, 2026. Python 3.9.6 and 3.13.7 let the crawler in on all six. Python 3.14.10 and 3.15.2 keep it out on three, a wildcard Disallow rule, a blank line inside a group, and longest-match order, and still let it in on three: a byte-order mark, a version number after the bot's name, and a wildcard print=true rule copied from a university athletics site.
What the site wroteWhat the site meantPython 3.9.6 and 3.13.7Python 3.14.10 and 3.15.2
Disallow: /*Stay outLet the crawler inKept the crawler out
A blank line inside a group of rulesStay outLet the crawler inKept the crawler out
Allow: / above Disallow: /private/Stay out of /private/Let the crawler inKept the crawler out
An invisible byte-order mark before the first lineStay outLet the crawler inLet the crawler in
User-agent: PioneerProcessBot/1.0 above Disallow: /Stay outLet the crawler inLet the crawler in

The two cases the newest releases still miss both look harmless in the file:

  • A byte-order mark. Some text editors save an invisible character at the very start of a file. Python's reader treats that character as part of the first line, so the first User-agent: line does not count, and the rules under it are lost. Google's documentation says Google ignores the mark.
  • A version number after the bot's name. A site that writes User-agent: PioneerProcessBot/1.0 above Disallow: / meant that crawler. Python's reader did not match the line and fell back to the rules written for every crawler. Google reads googlebot/1.2 as googlebot.

The test turned up a sixth gap that the fix did not close. Python 3.9.6 and 3.13.7 miss it because they ignore wildcards altogether. On Python 3.14.10 and 3.15.2, this rule does not block the address /story?print=true:

Disallow: /*print=true*

The reader rewrites the equals sign in the rule as the code %3D and leaves the equals sign in the address as it is, so the two never match. The standard compares both sides the same way, and its own example table leaves baz=quz as written. The gap only bites a wildcard rule without a ? checked against an address whose equals sign sits after the ?. Nobody made that rule up for the test. It appears, character for character, in the robots.txt file of a large university's athletics site that I read the same morning.

The fix history is public. The CPython issue titled "Support RFC 9309 in robotparser" was opened in September 2025 and closed on May 4, 2026, and its author filed it as a bug fix "because incorrect support of robots.txt files can make Python code that uses robotparser malicious." The fix reached Python 3.14.5 and 3.13.14, according to Python's changelogs. The python3 that Apple's Command Line Tools install at /usr/bin/python3 is 3.9.6 on the Mac I tested, and the 3.9 line stopped getting fixes on October 31, 2025, so it will never get the change.

What to do about the gaps: check which Python your crawler runs on, and do not trust the built-in reader on Python 3.12 or older, on 3.13 before 3.13.14, or on 3.14 before 3.14.5. On any version, feed the reader the robots.txt files of the sites you actually read, ask it about a few addresses you know the answer to, and compare. The test takes about a dozen lines of Python.

What to do when the request for robots.txt is turned away

When a site answers a crawler's request for robots.txt with a 401 or a 403, RFC 9309 says the crawler may read anything on the site, and Google crawls as if no rules exist, but a polite crawler leaves the site alone. Python's built-in reader also stays out after a 401 or a 403, on all four versions tested.

A table of what each reader does when the request for robots.txt gets each kind of answer. A 404, meaning no file: RFC 9309, Google, Python's reader, and Pioneer Pennant Process all read the site. A 401 or 403: RFC 9309 says the crawler may read anything, Google reads as if there were no rules, Python's reader stays out, and Process stays out. A server error: RFC 9309 says assume complete disallow, Google stops crawling for the first 12 hours, Python's reader stays out (500 and 503 tested), and Process stays out for the run.
A table of what each reader does when the request for robots.txt gets each kind of answer. A 404, meaning no file: RFC 9309, Google, Python's reader, and Pioneer Pennant Process all read the site. A 401 or 403: RFC 9309 says the crawler may read anything, Google reads as if there were no rules, Python's reader stays out, and Process stays out. A server error: RFC 9309 says assume complete disallow, Google stops crawling for the first 12 hours, Python's reader stays out (500 and 503 tested), and Process stays out for the run.

The standard's reasoning is that an answer in the 400 range means the file is unavailable, and an unavailable file means no rules. Google follows that reasoning and warns site owners directly: "Don't use 401 and 403 status codes for limiting the crawl rate." The three 403s I opened on November 4 came from bot walls, security layers that turn away visitors they do not recognize. A site that puts up a wall has said no, even when the file behind the wall would say yes.

More than 300 sites have turned my crawler away at robots.txt. On October 26, 2026, research for a new part of the app read the robots.txt files of three association and conference sites, and all three allowed the pages the app needed, with a 10-second delay between requests. By October 28, all three were refusing the crawler's own request for robots.txt, and on November 4 all three answered a plain request for the file with a 403 and a CDN error page instead of a robots file. In the same week, 294 athletics sites for the 624 NAIA and junior college programs the app added in October refused the crawler at robots.txt, most of them sites built on one athletics-website platform. The crawler left every one of them alone.

A crawler that gets a server error or a timeout on robots.txt should also stay out, for a different reason. RFC 9309 says a crawler that cannot reach robots.txt "MUST assume complete disallow," so a polite crawler stays out until the file can be read.

What respecting robots.txt cost on a real run

Respecting robots.txt costs some time and a lot of coverage, and the coverage is the cost that lasts. The first monthly run on the new crawler started at 9:00 PM on Sunday, November 1, 2026, and set out to check the head coaches of 928 NCAA programs. The reviewer's estimate had the run ending in the small hours of Monday. The run was done at 11:48 PM Sunday, 2 hours and 48 minutes after it started.

During that run, 49 sites answered the robots.txt request with a 401 or a 403, and 6 sites' robots.txt files could not be read. The crawler left those 55 sites alone and did not make 377 requests it would otherwise have made. The run still found 2 coaching changes.

The run finished hours sooner than the estimate because a crawl delay only spaces out requests to the same site. Of 24 college athletics sites sampled in August 2026, 20 asked every crawler to wait 30 seconds between requests. A run that reads one page from each of 300 sites never waits on any site's delay. A run that reads 300 pages from one site at 30 seconds a page takes 2.5 hours, so for a lot of pages from one site, the polite move is to look for a download or a feed the site publishes, or to ask.

The coverage cost is the pages a crawler never reads. On October 28, 2026, the crawler collected 344 candidate logos from colleges' own websites, every one was reviewed before use, and 293 were kept. After that run, 331 of the 624 new NAIA and junior college programs still showed their initials instead of a logo, mostly because their sites refuse the crawler or offer only a tiny icon. A gap like that gets filled by hand, by asking the site, or not at all.

Respecting robots.txt is not the same as permission

Following robots.txt does not make a data collection allowed, because robots.txt only says what a crawler may fetch, not what anyone may do with what it fetched. RFC 9309's first section says the rules "are not a form of access authorization," and a site's terms of use can say much more. One association's robots.txt reads Allow: /, and its terms of use, read in October 2026, say visitors may not "modify or copy the materials" or "use the materials for any commercial purpose." Pioneer Pennant Process stays off that site, even though its robots.txt would let the crawler in.

Routes around a rule fail the same test. Athletics sites on another platform block their /images/ folder in robots.txt, and the same images can be reached through the platform's image server, which has no robots.txt at all. Reading the images there would keep the letter of the rule and break its meaning, and the plan for the logo work ruled it out in writing.

Whether a particular collection is legal is a question for a lawyer, and robots.txt does not answer it. Before collecting anyone else's pages, check what the business already has. The data your business already owns is usually the cheaper first project.

How to check a crawler someone built for you

Six questions tell a business owner whether a crawler built for the business is polite, and the builder should be able to answer each one in a sentence.

  1. What name does it send? A crawler that sends a web browser's name cannot be told apart from a person, so no site can write a rule addressed to it.
  2. Is there a page that says what it reads and how to stop it? The link belongs in the name it sends.
  3. What reads robots.txt? If the answer is Python's built-in reader on a version older than 3.13.14 or 3.14.5, it misses all five cases above. On any version, ask to see it tested against the sites it actually reads.
  4. What does it do when robots.txt answers with a 401, a 403, a server error, or no answer at all? The polite answer to all four is to stay out for the run.
  5. What pace does it keep for each site, and how long does it wait when the site names no delay?
  6. Does it log every refusal, by site and reason? A refusal you can count is a gap you can fill another way.

Have someone other than the builder read the crawler before it runs. A separate review is what found the five gaps in Python's reader before my crawler shipped, and the same practice for any AI-written script is in can you trust AI-generated code.