This course is general information for learning, not legal advice. For business use of collected data, ask a lawyer.
By the end of this lesson you will open and read any site's robots.txt, know what it does and doesn't allow, check the terms of service in two minutes, and decide with a simple card whether you may collect a page.
You need: a browser, and optionally a terminal · Time: 8 minutes
Most websites keep a small text file called robots.txt at the top of the site. It tells programs ("bots", like search engines and scrapers) which parts of the site they should not visit. To see it, add
/robots.txtafter the site's main address, likehttps://www.example.com/robots.txt.The rules follow a standard called the Robots Exclusion Protocol (RFC 9309). That standard says something important: these rules are not a form of access authorization. In plain words:
- A Disallow is the owner asking bots to stay out. Respect it.
- A missing rule is not permission. The terms of service and the law still apply.
Here is the practice bookstore we will use in this course. It has no robots.txt at all:
You can also open the same address in your browser. A "404 Not Found" page means the same thing.
Why?robots.txt is the quickest way to learn what the owner wants. Ignoring it is not polite, it often gets you blocked, and if there is ever a dispute, it shows you knew their wishes and went ahead anyway.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Read the lines
- Practice: what may your bot visit?
- The terms of service: two minutes, three searches
- The decision card
- Recap