History<\/h1><\/p>\nThe standard was proposed by Martijn Koster<\/a>, when working for Nexor<\/a><\/ref> in February 1994 on the ''www-talk'' mailing list, the main communication channel for WWW-related activities at the time. Charles Stross<\/a> claims to have provoked Koster to suggest robots.txt, after he wrote a badly behaved web crawler that inadvertently caused a Standard<\/h1><\/p>\nWhen a site owner wishes to give instructions to web robots they place a text file called in the root of the web site hierarchy (e.g. ). 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 Compliance<\/h1><\/p>\nThe robots.txt protocol is widely complied with by bot operators. \n Search engines<\/h2><\/p>\nSome major Archival sites<\/h2><\/p>\nSome web archiving projects ignore robots.txt. Archive Team<\/a> uses the file to discover more links, such as sitemap<\/a>s. Co-founder Jason Scott<\/a> 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 Artificial intelligence<\/h2><\/p>\nStarting in the 2020s, web operators began using robots.txt to deny access to bots collecting training data for generative AI<\/a>. In 2023, Originality.AI found that 306 of the thousand most-visited websites blocked OpenAI<\/a>'s GPTBot in their robots.txt file and 85 blocked Security<\/h1><\/p>\nDespite the use of the terms ''allow'' and ''disallow'', the protocol is purely advisory and relies on the compliance of the web robot<\/a>; it cannot enforce any of what is stated in the file. Malicious web robots are unlikely to honor robots.txt; some may even use the robots.txt as a guide to find disallowed links and go straight to them. While this is sometimes claimed to be a security risk, this sort of '' security through obscurity<\/a>'' is discouraged by standards bodies. The Alternatives<\/h1><\/p>\nMany robots also pass a special user-agent<\/a> to the web server when fetching content. A web administrator could also configure the server to automatically return failure (or pass alternative content<\/a>) when it detects a connection using one of the robots.\n\nSome sites, such as Examples<\/h1><\/p>\nThis example tells all robots that they can visit all files because the wildcard The use of the wildcard * in rules <\/h2><\/p>\nThe directive Nonstandard extensions<\/h1><\/p>\n Crawl-delay directive<\/h2><\/p>\nThe crawl-delay value is supported by some crawlers to throttle their visits to the host. Since this value is not part of the standard, its interpretation is dependent on the crawler reading it. It is used when the multiple burst of visits from bots is slowing down the host. Yandex interprets the value as the number of seconds to wait between subsequent visits. Bing defines crawl-delay as the size of a time window (from 1 to 30 seconds) during which BingBot will access a web site only once.<\/ref> Google ignores this directive, but provides an interface in its search console<\/a> for webmasters, to control the Sitemap<\/h2><\/p>\nSome crawlers support a Universal \"*\" match<\/h2><\/p>\nThe ''Robot Exclusion Standard'' does not mention the \"*\" character in the Meta tags and headers<\/h1><\/p>\nIn addition to root-level robots.txt files, robots exclusion directives can be applied at a more granular level through the use of Robots meta tag<\/a>s and X-Robots-Tag HTTP headers. The robots meta tag cannot be used for non-HTML files such as images, text files, or PDF documents. On the other hand, the X-Robots-Tag can be added to non-HTML files by using .htaccess<\/a> and A \"noindex\" meta tag<\/h2><\/p>\n A \"noindex\" HTTP response header<\/h2><\/p>\n Maximum size of a robots.txt file<\/h2><\/p>\nThe Robots Exclusion Protocol requires crawlers to parse at least 500 kibibytes (512000 bytes) of robots.txt files, which Google maintains as a 500 kibibyte file size restriction for robots.txt files.<\/ref>\n See also<\/h1><\/p>\n\n\n* References<\/h1><\/p>\n\n Further reading <\/h1><\/p>\n* \n External links<\/h1><\/p>\n\n* \n\n\n\n{{DEFAULTSORT:Robots Exclusion Standard\n Search engine optimization<\/a>\n Websites<\/a>\n Web scraping<\/a>\n Text files<\/a>"
<\/span><\/div> on Koster's server.\n\nThe standard, initially RobotsNotWanted.txt, allowed
<\/span><\/div>s 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<\/a> overload was a primary concern. By June 1994 it had become a ''de facto'' standard<\/a>;<\/ref> most complied, including those operated by search engines such as
<\/span><\/div>,
<\/span><\/div>, and
<\/span><\/div>.<\/ref>\n\nOn July 1, 2019, Google announced the proposal of the Robots Exclusion Protocol as an official standard under
<\/span><\/div>. A proposed standard was published in September 2022 as RFC 9309.\n
<\/span><\/div>. 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.\n\nA 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.\n\nA 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.\n\nA robots.txt file covers one origin<\/a>. For websites with multiple subdomain<\/a>s, each subdomain must have its own robots.txt file. If had a robots.txt file but did not, the rules that would apply for would not apply to . In addition, each URI scheme<\/a> and
<\/span><\/div> needs its own robots.txt file; does not apply to pages under or .\n
<\/span><\/div> following this standard include Ask,<\/ref> AOL,<\/ref> Baidu,<\/ref> Bing,<\/ref> DuckDuckGo,<\/ref> Kagi,<\/ref> Google,<\/ref> Yahoo!,<\/ref> and Yandex.<\/ref>\n
<\/span><\/div> announced that it would stop complying with robots.txt directives. According to '' Digital Trends<\/a>'', 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.<\/ref>\n
<\/span><\/div>'s Google-Extended. Many robots.txt files named GPTBot as the only bot explicitly disallowed on all pages. Denying access to GPTBot was common among news websites such as the
<\/span><\/div> and ''
<\/span><\/div>''. In 2023, blog host Medium<\/a> announced it would deny access to all artificial intelligence web crawlers as \"AI companies have leached value from writers in order to spam Internet readers\".\n\nGPTBot complies with the robots.txt standard and gives advice to web operators about how to disallow it, but ''
<\/span><\/div>''s David Pierce said this only began after \"training the underlying models that made it so powerful\". Also, some bots are used both for search engines and artificial intelligence, and it may be impossible to block only one of these options. ''
<\/span><\/div>'' reported that companies like Anthropic<\/a> and Perplexity.ai<\/a> circumvented robots.txt by renaming or spinning up new scrapers to replace the ones that appeared on popular blocklist<\/a>s.\n
<\/span><\/div> (NIST) in the United States specifically recommends against this practice: \"System security should not depend on the secrecy of the implementation or its components.\" In the context of robots.txt files, security through obscurity is not recommended as a security technique.\n
<\/span><\/div>, host a humans.txt<\/code> file that displays information meant for humans to read. Some sites such as
<\/span><\/div> redirect humans.txt to an ''About'' page.\n\nPreviously, Google had a joke file hosted at \/killer-robots.txt<\/code> instructing
<\/span><\/div> not to kill the company founders
<\/span><\/div> and Sergey Brin<\/a>.\n*<\/code> stands for all robots and the
Disallow<\/code> directive has no value, meaning no pages are disallowed. Search engine giant Google open-sourced their robots.txt parser, and recommends testing and validating rules on the robots.txt file using community-built testers such as Tame the Bots and Real Robots Txt. \n\n
\nUser-agent: *\nDisallow: \n<\/pre>\n\nThis example has the same effect, allowing all files rather than prohibiting none.\n\n
\nUser-agent: *\nAllow: \/\n<\/pre>\n\nThe same result can be accomplished with an empty or missing robots.txt file.\n\nThis example tells all robots to stay out of a website:\n\n
\nUser-agent: *\nDisallow: \/\n<\/pre>\n\nThis example tells all robots not to enter three directories:\n\n
\nUser-agent: *\nDisallow: \/cgi-bin\/\nDisallow: \/tmp\/\nDisallow: \/junk\/\n<\/pre>\n\nThis example tells all robots to stay away from one specific file:\n\n
\nUser-agent: *\nDisallow: \/directory\/file.html\n<\/pre>\n\nAll other files in the specified directory will be processed.\n\n\nThis example tells one specific robot to stay out of a website:\n\n
\nUser-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot\nDisallow: \/\n<\/pre>\n\nThis example tells two specific robots not to enter one specific directory:\n\n
\nUser-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot\nUser-agent: Googlebot\nDisallow: \/private\/\n<\/pre>\n\nExample demonstrating how comments can be used:\n\n
\n# Comments appear after the \"#\" symbol at the start of a line, or after a directive\nUser-agent: * # match all bots\nDisallow: \/ # keep them out\n<\/pre>\n\nIt is also possible to list multiple robots with their own rules. The actual robot string is defined by the crawler. A few robot operators, such as
<\/span><\/div>, support several user-agent strings that allow the operator to deny access to a subset of their services by using specific user-agent strings.\n\nExample demonstrating multiple user-agents:\n\n\nUser-agent: googlebot # all Google services\nDisallow: \/private\/ # disallow this directory\n\nUser-agent: googlebot-news # only the news service\nDisallow: \/ # disallow everything\n\nUser-agent: * # any robot\nDisallow: \/something\/ # disallow this directory\n<\/pre>\n
Disallow: \/something\/<\/code> blocks all files and subdirectories starting with
\/something\/<\/code>.\n\nIn contrast using a wildcard, (if supported by the crawler), allows for more complex patterns in specifying paths and files to allow or disallow from crawling, for example
Disallow: \/something\/*\/other<\/code> blocks URLs such as:\n
\/something\/foo\/other\n\/something\/bar\/other\n<\/pre>\n\nIt would not prevent the crawling of
\/something\/foo\/else<\/code>, as that would not match the pattern.\n\nThe wildcard
*<\/code> allows greater flexibility but may not be recognized by all crawlers, although it is part of the Robots Exclusion Protocol RFC \n\nA wildcard at the end of a rule in effect does nothing, as that is the standard behaviour.\n
<\/span><\/div>'s subsequent visits.\n\n\nUser-agent: bingbot\nAllow: \/\nCrawl-delay: 10\n<\/pre>\n
Sitemap<\/code> directive, allowing multiple Sitemaps<\/a> in the same robots.txt<\/samp> in the form
Sitemap: ''full-url''<\/code>:\n
Sitemap: http:\/\/www.example.com\/sitemap.xml<\/pre>\n
Disallow:<\/code> statement.\n
<\/a>
files.<\/ref>\n ads.txt<\/a><\/code>, a standard for listing authorized ad sellers\n*
security.txt<\/a><\/code>, a file to describe the process for security researchers to follow in order to report security vulnerabilities\n* eBay v. Bidder's Edge<\/a>\n* Automated Content Access Protocol<\/a> \u2013 A failed proposal to extend robots.txt\n* BotSeer<\/a> \u2013 Now inactive search engine for robots.txt files\n* Distributed web crawling<\/a>\n* Focused crawler<\/a>\n*
<\/span><\/div>\n* Meta elements<\/a> for search engines\n*
<\/span><\/div> (NDLP)\n* National Digital Information Infrastructure and Preservation Program<\/a> (NDIIPP)\n*
<\/span><\/div>\n* noindex<\/a>\n* Perma.cc<\/a>\n* Sitemaps<\/a>\n* Spider trap<\/a>\n* Web archiving<\/a>\n*
<\/span><\/div>\n\n