Get your API key

Lesson 2 of 5

Read robots.txt and the terms

What robots.txt says and doesn't say, how to read its lines, what to look for in terms of service, and when to stop.

8 min Log in to open

This course is general information for learning, not legal advice. For business use of collected data, ask a lawyer.

One step at a time, like flipping pages.

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

  1. 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.txt after the site's main address, like https://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:

  1. Read the lines
  2. Practice: what may your bot visit?
  3. The terms of service: two minutes, three searches
  4. The decision card
  5. Recap