Does robots.txt Actually Bind Your Scraper?
Is robots.txt legally binding for a web scraper? Mostly no, but ignoring it is still a mistake. Here is what robots.txt really controls and how to treat it.
robots.txt is not a law and it is not a lock. It is a request. A file at the root of a site that tells well behaved crawlers which paths the owner would prefer they not fetch. It has no technical power to stop you and, in most jurisdictions, ignoring it is not by itself illegal. But treating that as permission to ignore it is a mistake. robots.txt is a signal about the site owner's wishes, and how you handle that signal shapes your legal exposure, your ethics, and whether you get blocked. I follow it by default and deviate only deliberately, with reasons I could defend.
Is robots.txt legally binding?
Generally, no, not on its own. robots.txt is a voluntary standard, the Robots Exclusion Protocol. It is not a contract you signed and it is not statute. Courts in several cases have treated public data as public even when robots.txt disallowed crawling. So the narrow answer to "will robots.txt alone put me in court" is usually not.
That is the narrow answer, and it is where people stop reading, which is the mistake. The legality of scraping does not hinge on robots.txt. It hinges on a stack of other things: the site's terms of service, whether the data is personal, whether you circumvented access controls, and copyright in what you collect. robots.txt is one small input. I lay out the inputs that actually matter in is web scraping legal and what actually matters, and robots.txt is near the bottom of that list, not the top.
Then why should I follow it at all?
Because "not illegal" and "wise" are different questions. Ignoring robots.txt costs you in ways that have nothing to do with a courtroom:
- It is a documented signal of intent. If a dispute ever arises, "the site clearly asked crawlers not to and they did anyway" is a bad fact to have on your side of the ledger, even if it is not dispositive. Following robots.txt keeps your conduct clean.
- It often maps to what the site cannot handle. Disallowed paths are frequently expensive endpoints, search pages, and infinite spaces the owner knows crawlers get stuck in. Respecting them keeps you out of crawler traps and off the site's radar.
- It reduces your block rate. Sites monitor for crawlers that ignore robots.txt because that behavior correlates with abuse. Following it is one more way to look like a normal client, which ties into the broader anti-block discipline in web scraping mistakes that get you blocked.
Following robots.txt is cheap. The cost of ignoring it is diffuse and shows up later. That asymmetry is why my default is to respect it.
What does robots.txt actually control?
It controls three things, and it is worth knowing the mechanics so you do not over or under read it. It lists disallowed paths per user agent, so a rule can target all crawlers or just yours. It can specify a crawl-delay, a requested minimum gap between requests, which is a direct input to how you pace a crawl, a topic I get into in how to keep scrapers reliable at scale. And it frequently points to the site's XML sitemap, which is genuinely useful because the sitemap is your cheapest source of what to crawl and what changed, which I use for incremental crawling in incremental crawl vs full recrawl.
So robots.txt is not just a wall to route around. Read properly, it hands you the sitemap and the site's own stated crawl budget. Ignoring the whole file means ignoring those gifts too.
How should I actually treat it?
Fetch and parse robots.txt before you crawl a site. Respect the disallow rules and the crawl-delay by default. Use the sitemap it points to. If there is a specific path you have a genuine business reason to crawl despite a disallow, make that a deliberate, documented decision with the rest of your compliance picture in view, not a blanket "we ignore robots.txt everywhere" policy set once and forgotten.
The mature position is that robots.txt is neither a law you must obey nor noise you can dismiss. It is a courtesy standard that also happens to lower your risk and your block rate when you follow it. Default to respecting it, understand the real legal inputs sit elsewhere, and deviate only where you can explain why. If you want a scraping layer that parses robots.txt, honors crawl-delay, and uses sitemaps automatically, that is built into PyroSync.