ArticleslgStudy

engineering

Robots.txt

Robots.txt is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Robots.txt rather than just read about it. In short: The Robots Exclusion Protocol (often referred to by the filename used to implement it, robots.txt) is a standard used by websites to indicate to visiting web crawlers and other web robots which portions of the website they are allowed to visit. The standard, developed in 1994, relies on voluntary compliance.

Robots.txt — main illustration
Robots.txt — illustration

Key takeaways

  • Robots.txt belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Robots.txt to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Robots.txt from memory before moving on to harder problems.

Reference excerpt

The Robots Exclusion Protocol (often referred to by the filename used to implement it, robots.txt) is a standard used by websites to indicate to visiting web crawlers and other web robots which portions of the website they are allowed to visit. The standard, developed in 1994, relies on voluntary compliance. Malicious bots can use the file as a directory of which pages to visit, though standards bodies discourage countering this with security through obscurity. Some archival sites ignore robots.txt. The standard was used in the 1990s to mitigate server overload. In the 2020s, websites began denying bots that collect information for generative AI. The "robots.txt" file can be used in conjunction with sitemaps, another robot inclusion standard for websites.

History The standard was proposed by Martijn Koster, when working for Nexor in February 1994 on the www-talk mailing list, the main communication channel for WWW-related activities at the time. Charles Stross claims to have provoked Koster to suggest robots.txt, after he wrote a badly behaved web crawler that inadvertently caused a denial-of-service attack on Koster's server. The standard, initially RobotsNotWanted.txt, allowed web developers to specify which bots should not access their website or which pages bots should not access. The internet was small enough in 1994 to maintain a complete list of all bots; server overload was a primary concern. By June 1994 it had become a de facto standard; most complied, including those operated by search engines such as WebCrawler, Lycos, and AltaVista. On July 1, 2019, Google announced the proposal of the Robots Exclusion Protocol as an official standard under Internet Engineering Task Force. A proposed standard was published in September 2022 as RFC 9309.

Standard A site owner wishing to give instructions to web robots places a text file called robots.txt in the root of the web site hierarchy (e.g. https://www.example.com/robots.txt). This text file contains the instructions in a specific format (see examples below). Robots that choose to follow the instructions try to fetch this file and read the instructions before fetching any other file from the website. If this file does not exist, web robots assume that the website owner does not wish to place any limitations on crawling the entire site. A robots.txt file contains instructions for bots indicating which web pages they can and cannot access. Robots.txt files are particularly important for web crawlers from search engines such as Google. A robots.txt file on a website will function as a request that specified robots ignore specified files or directories when crawling a site. This might be, for example, out of a preference for privacy from search engine results, or the belief that the content of the selected directories might be misleading or irrelevant to the categorization of the site as a whole, or out of a desire that an application only operates on certain data. Links to pages listed in robots.txt can still appear in search results if they are linked to from a page that is crawled. Because compliant crawlers cannot access the blocked page, search results may display only the URL or other information available from external sources, since the crawler cannot retrieve the page's content. A robots.txt file covers one origin. For websites with multiple subdomains, each subdomain must have its own robots.txt file. If example.com had a robots.txt file but foo.example.com did not, the rules that would apply for example.com would not apply to foo.example.com. In addition, each URI scheme and port needs its own robots.txt file; http://example.com/robots.txt does not apply to pages under http://example.com:8080/ or https://example.com/.

Compliance The robots.txt protocol is widely complied with by bot operators. The robots.txt played a role in the 1999 legal case of eBay v. Bidder's Edge, where eBay attempted to block a bot that did not comply with robots.txt, and in May 2000 a court ordered the company operating the bot to stop crawling eBay's servers using any automatic means, by legal injunction on the basis of trespassing. Bidder's Edge appealed the ruling, but agreed in March 2001 to drop the appeal, pay an undisclosed amount to eBay, and stop accessing eBay's auction information. In 2007, Healthcare Advocates v. Harding, a company was sued for accessing protected web pages archived via The Wayback Machine, despite robots.txt rules that prevented those pages from being archived. A Pennsylvania court ruled "in this situation, the robots.txt file qualifies as a technological measure" under the DMCA. Due to a malfunction at Internet Archive, Harding could temporarily access these pages from the archive and thus the court found "the Harding firm did not circumvent the protective measure". In 2013, Associated Press v. Meltwater U.S. Holdings, Inc. the Associated Press sued Meltwater for copyright infringement and misappropriation over copying of AP news items. Meltwater claimed that they did not require a license and that it was fair use, because the content was freely available and not protected by robots.txt. The court decided in March 2013 that "Meltwater’s copying is not protected by the fair use doctrine", mentioning among several factors that "failure […] to employ the robots.txt protocol did not give Meltwater […] license to copy and publish AP content".

Search engines Some major search engines following this standard include Google, Bing, Yahoo!, Yandex, DuckDuckGo, Baidu, AOL, Ask, and Kagi,

Archival sites Some web archiving projects ignore robots.txt. Archive Team uses the file to discover more links, such as sitemaps. Co-founder Jason Scott said that "unchecked, and left alone, the robots.txt file ensures no mirroring or reference for items that may have general use and meaning beyond the website's context." In 2017, the Internet Archive announced that it would stop complying with robots.txt directives. According to Digital Trends, this followed widespread use of robots.txt to remove historical sites from search engine results, and contrasted with the nonprofit's aim to archive "snapshots" of the internet as it previously existed.

… excerpt ends here. Continue reading the full article.

Illustrations

Robots.txt illustration

Worked examples

Example 1 — a first encounter with Robots.txt

Start with the simplest possible case. Write down what Robots.txt claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Robots.txt before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Robots.txt ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Robots.txt

In research
Robots.txt appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Robots.txt in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Robots.txt is common in secondary-school and first-year university syllabi. It links to neighbouring topics Internet bots, Search engine optimization, Text files, so understanding it makes those chapters shorter.
In everyday life
Look for Robots.txt outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Robots.txt” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Robots.txt in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Robots.txt means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Robots.txt out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Robots.txt in simple terms?

The Robots Exclusion Protocol (often referred to by the filename used to implement it, robots.txt) is a standard used by websites to indicate to visiting web crawlers and other web robots which portions of the website they are allowed to visit. The standard, developed in 1994, relies on voluntary c…

Why does Robots.txt matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Robots.txt?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Robots.txt.

Tags

  • Internet bots
  • Search engine optimization
  • Text files
  • Web scraping
  • Websites

Keep exploring