Robots.txt: Difference between revisions
[pending revision] | [accepted revision] |
Fixed tone of the ===warning=== section (now called ===Compatability===) |
VulcanSphere (talk | contribs) Removing the citation needed in the lead since the citations are available in the artificial intelligence section of this article |
||
Line 1: | Line 1: | ||
{{Short description|Filename used to indicate portions for web crawling}} |
|||
The '''robots exclusion standard''' or '''robots.txt protocol''' is a convention to prevent cooperating [[web spider]]s and other [[web robot]]s from accessing all or part of a [[website]]. The information specifying the parts that should not be accessed is specified in a file called '''robots.txt''' in the top-level directory of the website. |
|||
{{Lowercase}} |
|||
{{Selfref|For Wikipedia's robots.txt file, see https://en.wikipedia.org/robots.txt.}} |
|||
{{Pp-pc1}} |
|||
{{Pp-pc|small=yes}} |
|||
{{Infobox technology standard |
|||
| title = robots.txt |
|||
| long_name = Robots Exclusion Protocol |
|||
| image = Robots txt.svg |
|||
| image_size = |
|||
| alt = |
|||
| caption = Example of a simple robots.txt file, indicating that a user-agent called "Mallorybot" is not allowed to crawl any of the website's pages, and that other user-agents cannot crawl more than one page every 20 seconds, and are not allowed to crawl the "secret" folder |
|||
| abbreviation = |
|||
| native_name = <!-- Name in local language. If more than one, separate using {{plain list}} --> |
|||
| native_name_lang = <!-- ISO 639-1 code e.g. "fr" for French. If more than one, use {{lang}} inside native_name items instead --> |
|||
| status = Proposed Standard |
|||
| year_started = <!-- {{Start date|YYYY|MM|DD|df=y}} --> |
|||
| first_published = 1994 published, formally standardized in 2022 |
|||
| version = |
|||
| version_date = |
|||
| preview = |
|||
| preview_date = |
|||
| organization = |
|||
| committee = |
|||
| series = |
|||
| editors = |
|||
| authors = {{plain list| |
|||
* Martijn Koster (original author) |
|||
* Gary Illyes, Henner Zeller, Lizzi Sassman (IETF contributors) |
|||
}} |
|||
| base_standards = |
|||
| related_standards = |
|||
| predecessor = |
|||
| successor = |
|||
| domain = |
|||
| license = |
|||
| copyright = |
|||
| website = {{URL|https://robotstxt.org}}, {{URL|https://datatracker.ietf.org/doc/html/rfc9309|RFC 9309}} |
|||
}} |
|||
'''robots.txt''' is the [[filename]] used for implementing the '''Robots Exclusion Protocol''', a standard used by [[website]]s to indicate to visiting [[web crawler]]s and other [[Internet bot|web robots]] which portions of the website they are allowed to visit. |
|||
The robots.txt protocol was [http://www.robotstxt.org/wc/norobots.html created by consensus] in June 1994 by members of the robots mailing list (robots-request@nexor.co.uk). There is no official standards body or [[Request for Comments|RFC]] for the protocol. |
|||
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 (computing)|server]] overload. In the 2020s, websites began denying bots that collect information for [[generative artificial intelligence]]. |
|||
The protocol is purely advisory. It relies on the cooperation of the web robot, so that marking an area of your site out of bounds with robots.txt does not guarantee privacy. Many web site administrators have been caught trying to use the robots file to make private parts of a website invisible to the rest of the world. However, the file is necessarily publicly available and is easily checked by anyone with a web browser. |
|||
The "robots.txt" file can be used in conjunction with [[sitemaps]], another robot inclusion standard for websites. |
|||
The robots.txt patterns are matched by simple substring comparisons, so care should be taken to make sure that patterns matching directories have the final '/' character appended: otherwise all files with names starting with that substring will match, rather than just those in the directory intended. |
|||
== |
==History== |
||
The standard was proposed by [[Martijn Koster]],<ref>{{cite web |url=http://www.greenhills.co.uk/historical.html |title=Historical |website=Greenhills.co.uk |access-date=2017-03-03 |archive-url=https://web.archive.org/web/20170403152037/http://www.greenhills.co.uk/historical.html |archive-date=2017-04-03 |url-status=live }}</ref><ref>{{cite web |title=Maintaining Distributed Hypertext Infostructures: Welcome to MOMspider's Web |first=Roy |last=Fielding |work=First International Conference on the World Wide Web |year=1994 |place=Geneva |url=http://www94.web.cern.ch/WWW94/PapersWWW94/fielding.ps |access-date=September 25, 2013 |format=PostScript |archive-url=https://web.archive.org/web/20130927093658/http://www94.web.cern.ch/WWW94/PapersWWW94/fielding.ps |archive-date=2013-09-27 |url-status=live }}</ref> when working for [[Nexor]]<ref name=":0">{{cite web |url=http://www.robotstxt.org/orig.html#status |title=The Web Robots Pages |publisher=Robotstxt.org |date=1994-06-30 |access-date=2013-12-29 |archive-url=https://web.archive.org/web/20140112090633/http://www.robotstxt.org/orig.html#status |archive-date=2014-01-12 |url-status=live }}</ref> in February 1994<ref>{{cite web|title=Important: Spiders, Robots and Web Wanderers |first=Martijn |last=Koster |work=www-talk mailing list |date=25 February 1994 |url=http://inkdroid.org/tmp/www-talk/4113.html |format=[[Hypermail]] archived message |url-status=dead |archive-url=https://web.archive.org/web/20131029200350/http://inkdroid.org/tmp/www-talk/4113.html |archive-date=October 29, 2013 }}</ref> 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.<ref>{{cite web |url=http://www.antipope.org/charlie/blog-static/2009/06/how_i_got_here_in_the_end_part_3.html |title=How I got here in the end, part five: "things can only get better!" |work=Charlie's Diary |date=19 June 2006 |access-date=19 April 2014 |archive-url=https://web.archive.org/web/20131125220913/http://www.antipope.org/charlie/blog-static/2009/06/how_i_got_here_in_the_end_part_3.html |archive-date=2013-11-25 |url-status=live }}</ref> |
|||
This example '''allows all robots''' to visit '''all files''' because the wildcard "*" specifies all robots. |
|||
User-agent: * |
|||
Disallow: |
|||
The standard, initially RobotsNotWanted.txt, allowed [[web developer]]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 (computing)|server]] overload was a primary concern. By June 1994 it had become a [[de facto standard|''de facto'' standard]];<ref name="Verge">{{cite web|url=https://www.theverge.com/24067997/robots-txt-ai-text-file-web-crawlers-spiders|title=The text file that runs the internet|work=[[The Verge]]|last=Pierce|first=David|date=14 February 2024|accessdate=16 March 2024}}</ref> most complied, including those operated by search engines such as [[WebCrawler]], [[Lycos]], and [[AltaVista]].<ref name="sear_Robo">{{cite web |title=Robots.txt Celebrates 20 Years Of Blocking Search Engines |author=Barry Schwartz |work=Search Engine Land |date=30 June 2014 |access-date=2015-11-19 |url=http://searchengineland.com/robots-txt-celebrates-20-years-blocking-search-engines-195479 |archive-url=https://web.archive.org/web/20150907000430/http://searchengineland.com/robots-txt-celebrates-20-years-blocking-search-engines-195479 |archive-date=2015-09-07 |url-status=live }}</ref> |
|||
This example keeps '''all robots out''': |
|||
User-agent: * |
|||
Disallow: / |
|||
On July 1, 2019, Google announced the proposal of the Robots Exclusion Protocol as an official standard under [[Internet Engineering Task Force]].<ref>{{Cite web|url=https://webmasters.googleblog.com/2019/07/rep-id.html|title=Formalizing the Robots Exclusion Protocol Specification|website=Official Google Webmaster Central Blog|language=en|access-date=2019-07-10|archive-date=2019-07-10|archive-url=https://web.archive.org/web/20190710060436/https://webmasters.googleblog.com/2019/07/rep-id.html|url-status=live}}</ref> A proposed standard{{Ref RFC|9309}} was published in September 2022 as RFC 9309. |
|||
The next is an example that tells '''all crawlers''' not to enter into four directories of a website: |
|||
User-agent: * |
|||
Disallow: /cgi-bin/ |
|||
Disallow: /images/ |
|||
Disallow: /tmp/ |
|||
Disallow: /private/ |
|||
==Standard== |
|||
Example that tells '''a specific crawler''' not to enter one specific directory: |
|||
When a site owner wishes to give instructions to web robots they place a text file called {{mono|robots.txt}} in the root of the web site hierarchy (e.g. {{mono|<nowiki>https://www.example.com/robots.txt</nowiki>}}). 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. |
|||
User-agent: BadBot |
|||
Disallow: /private/ |
|||
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. |
|||
===Compatability=== |
|||
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.<ref>{{cite web |url=https://www.youtube.com/watch?v=KBdEwpRQRD0#t=196s |title=Uncrawled URLs in search results |publisher=YouTube |date=Oct 5, 2009 |access-date=2013-12-29 |archive-url=https://web.archive.org/web/20140106222500/http://www.youtube.com/watch?v=KBdEwpRQRD0#t=196s |archive-date=2014-01-06 |url-status=live }}</ref> |
|||
In order to prevent access to all pages by robots, |
|||
A robots.txt file covers one [[Same origin policy|origin]]. For websites with multiple subdomains, each subdomain must have its own robots.txt file. If {{mono|example.com}} had a robots.txt file but {{mono|a.example.com}} did not, the rules that would apply for {{mono|example.com}} would not apply to {{mono|a.example.com}}. In addition, each protocol and port needs its own robots.txt file; {{mono|<nowiki>http://example.com/robots.txt</nowiki>}} does not apply to pages under {{mono|<nowiki>http://example.com:8080/</nowiki>}} or {{mono|<nowiki>https://example.com/</nowiki>}}. |
|||
Disallow: * |
|||
==Compliance== |
|||
is not appropriate as this is not a stable standard extension. For example, despite the fact that Google claims support for this tag<ref>http://www.google.com/webmasters/remove.html</ref>, it in fact does not<ref>http://groups.google.com/groups?q=elvey+googlebot</ref>. |
|||
The robots.txt protocol is widely complied with by bot operators.<ref name="Verge"/> <!--It entered the court as part of ''[[eBay v. Bidder's Edge]]'',<ref name=":1">{{Cite news |last= |first= |date=2000-07-31 |title=EBay Fights Spiders on the Web |url=https://www.wired.com/2000/07/ebay-fights-spiders-on-the-web/ |access-date=2024-08-02 |work=[[Wired (magazine)|Wired]] |language=en-US |issn=1059-1028}}</ref> where eBay attempted to block a bot, and the company operating the crawler was ordered to stop crawling eBay's servers using any automatic means, by [[Injunction|legal injunction]] the basis of [[Trespass to chattels|trespassing]].<ref name="case">{{cite court|litigants=eBay v. Bidder's Edge|vol=100|reporter=F. Supp. 2d|opinion=1058|pinpoint=|court=[[N.D. Cal.]]|date=2000|quote=|url=http://www.cand.uscourts.gov/cand/tentrule.nsf/3979517dd11390ce8825690a007c1b9e/d0fc1406324de0cd882568e90081ebf4/$FILE/Ebay.pdf|archive-url=https://web.archive.org/web/20000817173849/http://www.cand.uscourts.gov/cand/tentrule.nsf/3979517dd11390ce8825690a007c1b9e/d0fc1406324de0cd882568e90081ebf4/$FILE/Ebay.pdf|url-status=dead|accessdate=2000-08-17}}</ref><ref>{{Cite web |last=Hoffmann |first=Jay |date=2020-09-15 |title=Chapter 4: Search |url=https://thehistoryoftheweb.com/book/search/ |access-date=2024-08-02 |website=The History of the Web |language=en-US}}</ref><ref name=":1" />--> |
|||
===Search engines=== |
|||
Instead: |
|||
Some major search [[Facebook Paper|engines]] following this standard include Ask,<ref name="ask-webmasters">{{cite web |title=About Ask.com: Webmasters |url=http://about.ask.com/docs/about/webmasters.shtml |website=About.ask.com |access-date=16 February 2013 |archive-date=27 January 2013 |archive-url=https://web.archive.org/web/20130127134025/http://about.ask.com/docs/about/webmasters.shtml |url-status=live }}</ref> AOL,<ref name="about-aol-search">{{cite web |title=About AOL Search |url=http://search.aol.com/aol/about |website=Search.aol.com |access-date=16 February 2013 |archive-date=13 December 2012 |archive-url=https://web.archive.org/web/20121213134546/http://search.aol.com/aol/about |url-status=dead }}</ref> Baidu,<ref name="baidu-spider">{{cite web |title=Baiduspider |url=http://www.baidu.com/search/spider_english.html |website=Baidu.com |access-date=16 February 2013 |archive-date=6 August 2013 |archive-url=https://web.archive.org/web/20130806131031/http://www.baidu.com/search/spider_english.html |url-status=live }}</ref> Bing,<ref name="bing-blog-robots">{{cite web|url=https://blogs.bing.com/webmaster/2008/06/03/robots-exclusion-protocol-joining-together-to-provide-better-documentation/|title=Robots Exclusion Protocol: joining together to provide better documentation|website=Blogs.bing.com|date=3 June 2008 |archive-url=https://web.archive.org/web/20140818025412/http://blogs.bing.com/webmaster/2008/06/03/robots-exclusion-protocol-joining-together-to-provide-better-documentation/|archive-date=2014-08-18|url-status=live|access-date=16 February 2013}}</ref> DuckDuckGo,<ref name="duckduckgo-bot">{{cite web|url=https://duckduckgo.com/duckduckbot|website=DuckDuckGo.com|title=DuckDuckGo Bot|access-date=25 April 2017|archive-date=16 February 2017|archive-url=https://web.archive.org/web/20170216043103/https://duckduckgo.com/duckduckbot|url-status=live}}</ref> Kagi,<ref name="KagiBot">{{cite web|url=https://kagi.com/bot|website=Kagi Search|title=Kagi Search KagiBot|access-date=20 November 2024|archive-date=12 April 2024|archive-url=https://web.archive.org/web/20240412192855/https://kagi.com/bot|url-status=live}}</ref> Google,<ref name="google-webmasters-spec">{{cite web |url=https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt |title=Webmasters: Robots.txt Specifications |work=Google Developers |access-date=16 February 2013 |archive-url=https://web.archive.org/web/20130115214137/https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt |archive-date=2013-01-15 |url-status=live }}</ref> Yahoo!,<ref name="yahoo-search-is-bing">{{cite web |url=http://help.yahoo.com/kb/index?page=content&y=PROD_SRCH&locale=en_US&id=SLN2217&impressions=true |title=Submitting your website to Yahoo! Search |access-date=16 February 2013 |archive-url=https://web.archive.org/web/20130121035801/http://help.yahoo.com/kb/index?page=content&y=PROD_SRCH&locale=en_US&id=SLN2217&impressions=true |archive-date=2013-01-21 |url-status=live }}</ref> and Yandex.<ref name="yandex-robots">{{cite web |url=http://help.yandex.com/webmaster/?id=1113851 |title=Using robots.txt |website=Help.yandex.com |access-date=16 February 2013 |archive-url=https://web.archive.org/web/20130125040017/http://help.yandex.com/webmaster/?id=1113851 |archive-date=2013-01-25 |url-status=live }}</ref> |
|||
Disallow: / |
|||
should be used. |
|||
===Archival sites=== |
|||
Some web archiving projects ignore robots.txt. [[Archive Team]] uses the file to discover more links, such as [[sitemap]]s.<ref>{{cite web |title=ArchiveBot: Bad behavior |url=https://wiki.archiveteam.org/index.php/ArchiveBot#Bad_behavior |website=wiki.archiveteam.org |publisher=Archive Team |access-date=10 October 2022 |archive-date=10 October 2022 |archive-url=https://web.archive.org/web/20221010034711/https://wiki.archiveteam.org/index.php/ArchiveBot#Bad_behavior |url-status=live }}</ref> 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."<ref>{{cite web|url=http://www.archiveteam.org/index.php?title=Robots.txt|publisher=Archive Team|title=Robots.txt is a suicide note|author=Jason Scott|access-date=18 February 2017|archive-url=https://web.archive.org/web/20170218044527/http://www.archiveteam.org/index.php?title=Robots.txt|archive-date=2017-02-18|url-status=live|author-link=Jason Scott}}</ref> In 2017, the [[Internet Archive]] announced that it would stop complying with robots.txt directives.<ref>{{Cite web|url=https://blog.archive.org/2017/04/17/robots-txt-meant-for-search-engines-dont-work-well-for-web-archives/|title=Robots.txt meant for search engines don't work well for web archives {{!}} Internet Archive Blogs|website=blog.archive.org|date=17 April 2017|language=en-US|access-date=2018-12-01|archive-url=https://web.archive.org/web/20181204130028/http://blog.archive.org/2017/04/17/robots-txt-meant-for-search-engines-dont-work-well-for-web-archives/|archive-date=2018-12-04|url-status=live}}</ref><ref name="Verge"/> 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.<ref name="Internet Archive">{{cite news |url=https://www.digitaltrends.com/computing/internet-archive-robots-txt/#ixzz4gQYOqpUi |title=The Internet Archive Will Ignore Robots.txt Files to Maintain Accuracy |newspaper=[[Digital Trends]] |first=Brad |last=Jones |date=24 April 2017 |access-date=8 May 2017 |archive-url=https://web.archive.org/web/20170516130029/https://www.digitaltrends.com/computing/internet-archive-robots-txt/#ixzz4gQYOqpUi |archive-date=2017-05-16 |url-status=live }}</ref> |
|||
===Artificial intelligence=== |
|||
Starting in the 2020s, web operators began using robots.txt to deny access to bots collecting training data for [[generative artificial intelligence|generative AI]]. In 2023, Originality.AI found that 306 of the thousand most-visited websites blocked [[OpenAI]]'s GPTBot in their robots.txt file and 85 blocked [[Google]]'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 [[BBC]] and ''[[The New York Times]]''. In 2023, blog host [[Medium (website)|Medium]] 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".<ref name="Verge"/> |
|||
GPTBot complies with the robots.txt standard and gives advice to web operators about how to disallow it, but ''[[The Verge]]''{{'}}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.<ref name="Verge"/> ''[[404 Media]]'' reported that companies like [[Anthropic]] and [[Perplexity.ai]] circumvented robots.txt by renaming or spinning up new scrapers to replace the ones that appeared on popular [[blocklist]]s.<ref>{{Cite web |last=Koebler |first=Jason |date=2024-07-29 |title=Websites are Blocking the Wrong AI Scrapers (Because AI Companies Keep Making New Ones) |url=https://www.404media.co/websites-are-blocking-the-wrong-ai-scrapers-because-ai-companies-keep-making-new-ones/ |access-date=2024-07-29 |website=404 Media}}</ref> |
|||
==Security== |
|||
Despite the use of the terms ''allow'' and ''disallow'', the protocol is purely advisory and relies on the compliance of the [[web robot]]; it cannot enforce any of what is stated in the file. <ref>{{cite web |title=Block URLs with robots.txt: Learn about robots.txt files |url=https://support.google.com/webmasters/answer/6062608 |access-date=2015-08-10 |archive-url=https://web.archive.org/web/20150814013400/https://support.google.com/webmasters/answer/6062608 |archive-date=2015-08-14 |url-status=live }}</ref> 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,<ref>{{cite web |url=https://www.theregister.co.uk/2015/05/19/robotstxt/ |title=Robots.txt tells hackers the places you don't want them to look |work=The Register |access-date=August 12, 2015 |archive-url=https://web.archive.org/web/20150821063759/http://www.theregister.co.uk/2015/05/19/robotstxt/ |archive-date=2015-08-21 |url-status=live }}</ref> this sort of ''[[security through obscurity]]'' is discouraged by standards bodies. The [[National Institute of Standards and Technology]] (NIST) in the United States specifically recommends against this practice: "System security should not depend on the secrecy of the implementation or its components."<ref>{{cite journal |last1=Scarfone |first1=K. A. |last2=Jansen |first2=W. |last3=Tracy |first3=M. |date=July 2008 |title=Guide to General Server Security |url=http://csrc.nist.gov/publications/nistpubs/800-123/SP800-123.pdf |url-status=live |journal=National Institute of Standards and Technology |doi=10.6028/NIST.SP.800-123 |archive-url=https://web.archive.org/web/20111008115412/http://csrc.nist.gov/publications/nistpubs/800-123/SP800-123.pdf |archive-date=2011-10-08 |access-date=August 12, 2015}}</ref> In the context of robots.txt files, security through obscurity is not recommended as a security technique.<ref>{{cite book |author=Sverre H. Huseby |title=Innocent Code: A Security Wake-Up Call for Web Programmers |publisher=John Wiley & Sons |year=2004 |pages=91–92 |isbn=9780470857472 |url=https://books.google.com/books?id=RjVjgPQsKogC&pg=PA92 |access-date=2015-08-12 |archive-url=https://web.archive.org/web/20160401193437/https://books.google.com/books?id=RjVjgPQsKogC&pg=PA92 |archive-date=2016-04-01 |url-status=live }}</ref> |
|||
==Alternatives== |
==Alternatives== |
||
Many robots also pass a special [[user-agent]] to the web server when fetching content.<ref>{{cite web |url=http://www.user-agents.org/ |title=List of User-Agents (Spiders, Robots, Browser) |publisher=User-agents.org |access-date=2013-12-29 |archive-url=https://web.archive.org/web/20140107154205/http://user-agents.org/ |archive-date=2014-01-07 |url-status=live }}</ref> A web administrator could also configure the server to automatically return failure (or [[Cloaking|pass alternative content]]) when it detects a connection using one of the robots.<ref>{{cite web |url=https://httpd.apache.org/docs/2.2/howto/access.html |title=Access Control - Apache HTTP Server |publisher=Httpd.apache.org |access-date=2013-12-29 |archive-url=https://web.archive.org/web/20131229110831/http://httpd.apache.org/docs/2.2/howto/access.html |archive-date=2013-12-29 |url-status=live }}</ref><ref>{{cite web |url=http://www.iis.net/configreference/system.webserver/security/requestfiltering/filteringrules/filteringrule/denystrings |title=Deny Strings for Filtering Rules : The Official Microsoft IIS Site |publisher=Iis.net |date=2013-11-06 |access-date=2013-12-29 |archive-url=https://web.archive.org/web/20140101112730/http://www.iis.net/configreference/system.webserver/security/requestfiltering/filteringrules/filteringrule/denystrings |archive-date=2014-01-01 |url-status=live }}</ref> |
|||
robots.txt is older and more widely accepted, but there are other methods (which can be used together with robots.txt) that allow greater control, like disabling indexing of images only or disabling archiving of page contents. |
|||
Some sites, such as [[Google]], host a <code>humans.txt</code> file that displays information meant for humans to read.<ref>{{Cite web |url=https://www.google.com/humans.txt |title=Google humans.txt |access-date=October 3, 2019 |archive-date=January 24, 2017 |archive-url=https://web.archive.org/web/20170124121422/https://www.google.com/humans.txt |url-status=live }}</ref> Some sites such as [[GitHub]] redirect humans.txt to an ''About'' page.<ref>{{Cite web |url=https://github.com/humans.txt |title=Github humans.txt |website=[[GitHub]] |access-date=October 3, 2019 |archive-date=May 30, 2016 |archive-url=https://web.archive.org/web/20160530160942/https://github.com/humans.txt |url-status=live }}</ref> |
|||
===HTML meta tags for robots=== |
|||
[[HTML]] [[meta tag]]s can be used to exclude robots according to the contents of web pages. Again, this is purely advisory, and also relies on the cooperation of the robot programs. For example, |
|||
Previously, Google had a joke file hosted at <code>/killer-robots.txt</code> instructing [[Terminator (character)|the Terminator]] not to kill the company founders [[Larry Page]] and [[Sergey Brin]].<ref>{{Cite web|url=https://slate.com/technology/2014/07/a-killer-robots-txt-google-easter-egg.html|title=Is This a Google Easter Egg or Proof That Skynet Is Actually Plotting World Domination?|last=Newman|first=Lily Hay|date=2014-07-03|website=Slate Magazine|language=en|access-date=2019-10-03|archive-date=2018-11-18|archive-url=https://web.archive.org/web/20181118104127/https://slate.com/technology/2014/07/a-killer-robots-txt-google-easter-egg.html|url-status=live}}</ref><ref>{{Cite web|url=https://www.google.com/killer-robots.txt|title=/killer-robots.txt|date=2018-01-10|url-status=dead|archive-url=https://web.archive.org/web/20180110160916/https://www.google.com/killer-robots.txt|archive-date=2018-01-10|access-date=2018-05-25}}</ref> |
|||
<pre><meta name="robots" content="noindex,nofollow" /></pre> |
|||
==Examples== |
|||
within the <code>HEAD</code> section of an [[HTML]] document tells search engines such as [[Google]], [[Yahoo!]], or [[MSN]] to exclude the page from its index and not to follow any links on this page for further possible indexing. |
|||
This example tells all robots that they can visit all files because the wildcard <code>*</code> stands for all robots and the <code>Disallow</code> directive has no value, meaning no pages are disallowed. |
|||
<pre> |
|||
(See [http://www.robotstxt.org/wc/meta-user.html HTML Author's Guide to the Robots META tag].) |
|||
User-agent: * |
|||
Disallow: |
|||
</pre> |
|||
This example has the same effect, allowing all files rather than prohibiting none. |
|||
=== Directives within a page=== |
|||
The <tt><NOINDEX></tt> tag is a non-standard HTML tag whose intent is to indicate portions of a page that should not be indexed, such as common navigation or footer. Using it without a namespace will make [[XHTML]] pages invalid. |
|||
<pre> |
|||
Google uses comments for the same purpose: <tt><nowiki><!--googleoff: index--> ... <!--googleon: index--></nowiki></tt> |
|||
User-agent: * |
|||
Allow: / |
|||
</pre> |
|||
The same result can be accomplished with an empty or missing robots.txt file. |
|||
==References== |
|||
<references /> |
|||
This example tells all robots to stay out of a website: |
|||
<pre> |
|||
User-agent: * |
|||
Disallow: / |
|||
</pre> |
|||
This example tells all robots not to enter three directories: |
|||
<pre> |
|||
User-agent: * |
|||
Disallow: /cgi-bin/ |
|||
Disallow: /tmp/ |
|||
Disallow: /junk/ |
|||
</pre> |
|||
This example tells all robots to stay away from one specific file: |
|||
<pre> |
|||
User-agent: * |
|||
Disallow: /directory/file.html |
|||
</pre> |
|||
All other files in the specified directory will be processed. |
|||
<pre> |
|||
User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot |
|||
Disallow: / |
|||
</pre> |
|||
This example tells two specific robots not to enter one specific directory: |
|||
<pre> |
|||
User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot |
|||
User-agent: Googlebot |
|||
Disallow: /private/ |
|||
</pre> |
|||
Example demonstrating how comments can be used: |
|||
<pre> |
|||
# Comments appear after the "#" symbol at the start of a line, or after a directive |
|||
User-agent: * # match all bots |
|||
Disallow: / # keep them out |
|||
</pre> |
|||
It 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 [[Google]], support several user-agent strings that allow the operator to deny access to a subset of their services by using specific user-agent strings.<ref name="google-webmasters-spec" /> |
|||
Example demonstrating multiple user-agents: |
|||
<pre> |
|||
User-agent: googlebot # all Google services |
|||
Disallow: /private/ # disallow this directory |
|||
User-agent: googlebot-news # only the news service |
|||
Disallow: / # disallow everything |
|||
User-agent: * # any robot |
|||
Disallow: /something/ # disallow this directory |
|||
</pre> |
|||
==== Difference Between <code>Disallow: /something/</code> and <code>Disallow: /something/*</code> ==== |
|||
The directive <code>Disallow: /something/</code> blocks all files and subdirectories starting with <code>/something/</code>. In contrast, <code>Disallow: /something/*</code> (if supported by the crawler) blocks URLs with more complex patterns, such as <code>/something-folder/page</code>. The wildcard <code>*</code> allows greater flexibility but may not be recognized by all crawlers. |
|||
==Nonstandard extensions== |
|||
===Crawl-delay directive=== |
|||
The 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.<ref name="yandex-robots"/> 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 name="bing-crawl-delay">{{cite web |url=https://blogs.bing.com/webmaster/2012/05/03/to-crawl-or-not-to-crawl-that-is-bingbots-question/ |title=To crawl or not to crawl, that is BingBot's question |date=3 May 2012 |access-date=9 February 2016 |archive-url=https://web.archive.org/web/20160203142822/https://blogs.bing.com/webmaster/2012/05/03/to-crawl-or-not-to-crawl-that-is-bingbots-question/ |archive-date=2016-02-03 |url-status=live }}</ref> Google ignores this directive,<ref>{{cite web |title=How Google interprets the robots.txt specification |url=https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt |website=Google Search Central |access-date=2024-10-06 |date=2024-05-23}}</ref> but provides an interface in its [[Google Search Console|search console]] for webmasters, to control the [[Googlebot]]'s subsequent visits.<ref>{{cite web |title=Change Googlebot crawl rate - Search Console Help |url=https://support.google.com/webmasters/answer/48620?hl=en |website=support.google.com |access-date=22 October 2018 |language=en |archive-url=https://web.archive.org/web/20181118205747/https://support.google.com/webmasters/answer/48620?hl=en |archive-date=2018-11-18 |url-status=live }}</ref> |
|||
<pre> |
|||
User-agent: bingbot |
|||
Allow: / |
|||
Crawl-delay: 10 |
|||
</pre> |
|||
===Sitemap=== |
|||
Some crawlers support a <code>Sitemap</code> directive, allowing multiple [[Sitemaps]] in the same <samp>robots.txt</samp> in the form <code>Sitemap: ''full-url''</code>:<ref>{{cite web |url=http://ysearchblog.com/2007/04/11/webmasters-can-now-auto-discover-with-sitemaps/ |title=Yahoo! Search Blog - Webmasters can now auto-discover with Sitemaps |access-date=2009-03-23 |archive-url=https://web.archive.org/web/20090305061841/http://ysearchblog.com/2007/04/11/webmasters-can-now-auto-discover-with-sitemaps/ |archive-date=2009-03-05 |url-status=dead }}</ref> |
|||
<pre>Sitemap: http://www.example.com/sitemap.xml</pre> |
|||
===Universal "*" match=== |
|||
The ''Robot Exclusion Standard'' does not mention the "*" character in the <code>Disallow:</code> statement.<ref>{{cite web |url=https://developers.google.com/search/reference/robots_txt?hl=en |title=Robots.txt Specifications |website=Google Developers |access-date=February 15, 2020 |archive-date=November 2, 2019 |archive-url=https://web.archive.org/web/20191102192623/https://developers.google.com/search/reference/robots_txt?hl=en |url-status=live }}</ref><!-- Please note that Google updated their code to match the standard on On July 1, 2019. References older than that may contain old, obsolete information about how Google behaves --> |
|||
==Meta tags and headers== |
|||
In 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]]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]] and [[httpd.conf]] files.<ref name="google-meta">{{cite web |url=https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag |title=Robots meta tag and X-Robots-Tag HTTP header specifications - Webmasters — Google Developers |access-date=2013-08-17 |archive-url=https://web.archive.org/web/20130808020946/https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag |archive-date=2013-08-08 |url-status=live }}</ref> |
|||
===A "noindex" meta tag=== |
|||
<syntaxhighlight lang="html"> |
|||
<meta name="robots" content="noindex" /> |
|||
</syntaxhighlight> |
|||
===A "noindex" HTTP response header=== |
|||
<syntaxhighlight lang="html"> |
|||
X-Robots-Tag: noindex |
|||
</syntaxhighlight> |
|||
The X-Robots-Tag is only effective after the page has been requested and the server responds, and the robots meta tag is only effective after the page has loaded, whereas robots.txt is effective before the page is requested. Thus if a page is excluded by a robots.txt file, any robots meta tags or X-Robots-Tag headers are effectively ignored because the robot will not see them in the first place.<ref name="google-meta"/> |
|||
===Maximum size of a robots.txt file=== |
|||
The Robots Exclusion Protocol requires crawlers to parse at least 500 kibibytes (512000 bytes) of robots.txt files,{{Ref RFC|9309|section=2.5: Limits}} which Google maintains as a 500 kibibyte file size restriction for robots.txt files.<ref>{{Cite web |title=How Google Interprets the robots.txt Specification {{!}} Documentation |url=https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt |access-date=2022-10-17 |website=Google Developers |language=en |archive-date=2022-10-17 |archive-url=https://web.archive.org/web/20221017101925/https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt |url-status=live }}</ref> |
|||
==See also== |
==See also== |
||
{{Portal|Internet}} |
|||
{{Div col|colwidth=30em}} |
|||
* <code>[[ads.txt]]</code>, a standard for listing authorized ad sellers |
|||
* <code>[[security.txt]]</code>, a file to describe the process for security researchers to follow in order to report security vulnerabilities |
|||
* [[eBay v. Bidder's Edge]] |
|||
* [[Automated Content Access Protocol]] – A failed proposal to extend robots.txt |
|||
* [[BotSeer]] – Now inactive search engine for robots.txt files |
|||
* [[Distributed web crawling]] |
|||
* [[Focused crawler]] |
|||
* [[Internet Archive]] |
|||
* [[Robots meta tag|Meta elements]] for search engines |
|||
* [[National Digital Library Program]] (NDLP) |
|||
* [[National Digital Information Infrastructure and Preservation Program]] (NDIIPP) |
|||
* [[nofollow]] |
|||
* [[noindex]] |
|||
* [[Perma.cc]] |
|||
* [[Sitemaps]] |
|||
* [[Spider trap]] |
|||
* [[Web archiving]] |
|||
* [[Web crawler]] |
* [[Web crawler]] |
||
{{Div col end}} |
|||
* [[Spam in blogs#rel=nofollow|The nofollow attribute]] |
|||
==References== |
|||
{{Reflist|30em}} |
|||
== Further reading == |
|||
* {{Cite web |last=Allyn |first=Bobby |date=5 July 2024 |title=Artificial Intelligence Web Crawlers Are Running Amok |url=https://www.npr.org/2024/07/05/nx-s1-5026932/artificial-intelligence-web-crawlers-are-running-amok |url-status=live |archive-url=https://web.archive.org/web/20240706063210/https://www.npr.org/2024/07/05/nx-s1-5026932/artificial-intelligence-web-crawlers-are-running-amok |archive-date=6 July 2024 |work=[[All Things Considered]] |publisher=[[NPR]] |access-date=6 July 2024}} |
|||
==External links== |
==External links== |
||
<!-- |
|||
*[http://www.whitehouse.gov/robots.txt The robots.txt of the US White House] |
|||
+============================ {{No more links}} ============================+ |
|||
*[http://www.fleiner.com/bots/ How to keep bad robots, spiders and web crawlers away] |
|||
| DO NOT ADD EXTERNAL LINKS WITHOUT DISCUSSING THEM ON THE TALK PAGE FIRST! | |
|||
*[http://www.ilovejackdaniels.com/development/robots-txt-file/ robots.txt File] (tutorial on how and why to add a robots.txt file to websites, July 19, 2004) |
|||
| In particular, there are too many blogs, SEO pages and free tools to list | |
|||
*[http://www.kloth.net/internet/badbots.php List of Bad Bots]: A short list of bad spiders and nasty bots seen on my different web sites |
|||
| them all, and only listing a few of them unfairly gives those pages free | |
|||
*[http://laffey.tv/favicon_error_logs.html HOWTO: Serving up default favicon.ico and robots.txt files with Apache] |
|||
| advertising that the pages we don't list don't get. | |
|||
*[http://tool.motoricerca.info/robots-checker.phtml Robots.txt Checker] (validates robots.txt files and gives optimization tips) |
|||
*============================ {{No more links}} ============================+ |
|||
*[http://www.robotstxt.org/wc/norobots.html A Standard for Robot Exclusion] |
|||
--> |
|||
*[http://www.robotstxt.org/wc/exclusion.html Robots Exclusion] |
|||
* {{Official website|https://www.robotstxt.org}} |
|||
*[http://www.yellowpipe.com/yis/tools/robots.txt/ Robots.txt Online Generator] |
|||
*[http://www.rietta.com/robogen RoboGen] - Shareware Windows program for creating and editing robot exclusion files |
|||
*[http://www.theinquirer.net/?article=19357 White House site has oddities, like Bush site], Nick Farrell (October 29, 2004) |
|||
*[http://www.cre8asiteforums.com/forums/index.php?showtopic=8412&hl= Comprehensive Robots.txt Tutorial] |
|||
*[http://www.servergrade.com.au/faq/answers/robots-text.html Using Robots.txt To Manage Search Engine Spiders] |
|||
{{Authority control}} |
|||
[[Category:World Wide Web]] |
|||
{{DEFAULTSORT:Robots Exclusion Standard}} |
|||
[[Category:Search engine optimization]] |
|||
[[fr:Fichier d'exclusion des robots]] |
|||
[[Category:Websites]] |
|||
[[ko:로봇 배제 표준]] |
|||
[[Category:Web scraping]] |
|||
[[he:Robots.txt]] |
|||
[[ |
[[Category:Text files]] |
||
[[pl:Robots Exclusion Protocol]] |
|||
[[ru:Robots.txt]] |
|||
[[zh:Robots.txt]] |
Latest revision as of 06:49, 23 December 2024
Robots Exclusion Protocol | |
Status | Proposed Standard |
---|---|
First published | 1994 published, formally standardized in 2022 |
Authors |
|
Website | robotstxt |
robots.txt is the filename used for implementing the Robots Exclusion Protocol, 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 artificial intelligence.
The "robots.txt" file can be used in conjunction with sitemaps, another robot inclusion standard for websites.
History
[edit]The standard was proposed by Martijn Koster,[1][2] when working for Nexor[3] in February 1994[4] 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.[5]
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;[6] most complied, including those operated by search engines such as WebCrawler, Lycos, and AltaVista.[7]
On July 1, 2019, Google announced the proposal of the Robots Exclusion Protocol as an official standard under Internet Engineering Task Force.[8] A proposed standard[9] was published in September 2022 as RFC 9309.
Standard
[edit]When a site owner wishes to give instructions to web robots they place 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.[10]
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 a.example.com did not, the rules that would apply for example.com would not apply to a.example.com. In addition, each protocol 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
[edit]The robots.txt protocol is widely complied with by bot operators.[6]
Search engines
[edit]Some major search engines following this standard include Ask,[11] AOL,[12] Baidu,[13] Bing,[14] DuckDuckGo,[15] Kagi,[16] Google,[17] Yahoo!,[18] and Yandex.[19]
Archival sites
[edit]Some web archiving projects ignore robots.txt. Archive Team uses the file to discover more links, such as sitemaps.[20] 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."[21] In 2017, the Internet Archive announced that it would stop complying with robots.txt directives.[22][6] 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.[23]
Artificial intelligence
[edit]Starting in the 2020s, web operators began using robots.txt to deny access to bots collecting training data for generative AI. In 2023, Originality.AI found that 306 of the thousand most-visited websites blocked OpenAI's GPTBot in their robots.txt file and 85 blocked Google'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 BBC and The New York Times. In 2023, blog host Medium 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".[6]
GPTBot complies with the robots.txt standard and gives advice to web operators about how to disallow it, but The Verge'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.[6] 404 Media reported that companies like Anthropic and Perplexity.ai circumvented robots.txt by renaming or spinning up new scrapers to replace the ones that appeared on popular blocklists.[24]
Security
[edit]Despite the use of the terms allow and disallow, the protocol is purely advisory and relies on the compliance of the web robot; it cannot enforce any of what is stated in the file. [25] 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,[26] this sort of security through obscurity is discouraged by standards bodies. The National Institute of Standards and Technology (NIST) in the United States specifically recommends against this practice: "System security should not depend on the secrecy of the implementation or its components."[27] In the context of robots.txt files, security through obscurity is not recommended as a security technique.[28]
Alternatives
[edit]Many robots also pass a special user-agent to the web server when fetching content.[29] A web administrator could also configure the server to automatically return failure (or pass alternative content) when it detects a connection using one of the robots.[30][31]
Some sites, such as Google, host a humans.txt
file that displays information meant for humans to read.[32] Some sites such as GitHub redirect humans.txt to an About page.[33]
Previously, Google had a joke file hosted at /killer-robots.txt
instructing the Terminator not to kill the company founders Larry Page and Sergey Brin.[34][35]
Examples
[edit]This example tells all robots that they can visit all files because the wildcard *
stands for all robots and the Disallow
directive has no value, meaning no pages are disallowed.
User-agent: * Disallow:
This example has the same effect, allowing all files rather than prohibiting none.
User-agent: * Allow: /
The same result can be accomplished with an empty or missing robots.txt file.
This example tells all robots to stay out of a website:
User-agent: * Disallow: /
This example tells all robots not to enter three directories:
User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /junk/
This example tells all robots to stay away from one specific file:
User-agent: * Disallow: /directory/file.html
All other files in the specified directory will be processed.
User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot Disallow: /
This example tells two specific robots not to enter one specific directory:
User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot User-agent: Googlebot Disallow: /private/
Example demonstrating how comments can be used:
# Comments appear after the "#" symbol at the start of a line, or after a directive User-agent: * # match all bots Disallow: / # keep them out
It 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 Google, support several user-agent strings that allow the operator to deny access to a subset of their services by using specific user-agent strings.[17]
Example demonstrating multiple user-agents:
User-agent: googlebot # all Google services Disallow: /private/ # disallow this directory User-agent: googlebot-news # only the news service Disallow: / # disallow everything User-agent: * # any robot Disallow: /something/ # disallow this directory
Difference Between Disallow: /something/
and Disallow: /something/*
[edit]The directive Disallow: /something/
blocks all files and subdirectories starting with /something/
. In contrast, Disallow: /something/*
(if supported by the crawler) blocks URLs with more complex patterns, such as /something-folder/page
. The wildcard *
allows greater flexibility but may not be recognized by all crawlers.
Nonstandard extensions
[edit]Crawl-delay directive
[edit]The 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.[19] 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.[36] Google ignores this directive,[37] but provides an interface in its search console for webmasters, to control the Googlebot's subsequent visits.[38]
User-agent: bingbot Allow: / Crawl-delay: 10
Sitemap
[edit]Some crawlers support a Sitemap
directive, allowing multiple Sitemaps in the same robots.txt in the form Sitemap: full-url
:[39]
Sitemap: http://www.example.com/sitemap.xml
Universal "*" match
[edit]The Robot Exclusion Standard does not mention the "*" character in the Disallow:
statement.[40]
Meta tags and headers
[edit]In addition to root-level robots.txt files, robots exclusion directives can be applied at a more granular level through the use of Robots meta tags 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 and httpd.conf files.[41]
A "noindex" meta tag
[edit]<meta name="robots" content="noindex" />
A "noindex" HTTP response header
[edit]X-Robots-Tag: noindex
The X-Robots-Tag is only effective after the page has been requested and the server responds, and the robots meta tag is only effective after the page has loaded, whereas robots.txt is effective before the page is requested. Thus if a page is excluded by a robots.txt file, any robots meta tags or X-Robots-Tag headers are effectively ignored because the robot will not see them in the first place.[41]
Maximum size of a robots.txt file
[edit]The Robots Exclusion Protocol requires crawlers to parse at least 500 kibibytes (512000 bytes) of robots.txt files,[42] which Google maintains as a 500 kibibyte file size restriction for robots.txt files.[43]
See also
[edit]ads.txt
, a standard for listing authorized ad sellerssecurity.txt
, a file to describe the process for security researchers to follow in order to report security vulnerabilities- eBay v. Bidder's Edge
- Automated Content Access Protocol – A failed proposal to extend robots.txt
- BotSeer – Now inactive search engine for robots.txt files
- Distributed web crawling
- Focused crawler
- Internet Archive
- Meta elements for search engines
- National Digital Library Program (NDLP)
- National Digital Information Infrastructure and Preservation Program (NDIIPP)
- nofollow
- noindex
- Perma.cc
- Sitemaps
- Spider trap
- Web archiving
- Web crawler
References
[edit]- ^ "Historical". Greenhills.co.uk. Archived from the original on 2017-04-03. Retrieved 2017-03-03.
- ^ Fielding, Roy (1994). "Maintaining Distributed Hypertext Infostructures: Welcome to MOMspider's Web" (PostScript). First International Conference on the World Wide Web. Geneva. Archived from the original on 2013-09-27. Retrieved September 25, 2013.
- ^ "The Web Robots Pages". Robotstxt.org. 1994-06-30. Archived from the original on 2014-01-12. Retrieved 2013-12-29.
- ^ Koster, Martijn (25 February 1994). "Important: Spiders, Robots and Web Wanderers". www-talk mailing list. Archived from the original (Hypermail archived message) on October 29, 2013.
- ^ "How I got here in the end, part five: "things can only get better!"". Charlie's Diary. 19 June 2006. Archived from the original on 2013-11-25. Retrieved 19 April 2014.
- ^ a b c d e Pierce, David (14 February 2024). "The text file that runs the internet". The Verge. Retrieved 16 March 2024.
- ^ Barry Schwartz (30 June 2014). "Robots.txt Celebrates 20 Years Of Blocking Search Engines". Search Engine Land. Archived from the original on 2015-09-07. Retrieved 2015-11-19.
- ^ "Formalizing the Robots Exclusion Protocol Specification". Official Google Webmaster Central Blog. Archived from the original on 2019-07-10. Retrieved 2019-07-10.
- ^ Koster, M.; Illyes, G.; Zeller, H.; Sassman, L. (September 2022). Robots Exclusion Protocol. Internet Engineering Task Force. doi:10.17487/RFC9309. RFC 9309. Proposed Standard.
- ^ "Uncrawled URLs in search results". YouTube. Oct 5, 2009. Archived from the original on 2014-01-06. Retrieved 2013-12-29.
- ^ "About Ask.com: Webmasters". About.ask.com. Archived from the original on 27 January 2013. Retrieved 16 February 2013.
- ^ "About AOL Search". Search.aol.com. Archived from the original on 13 December 2012. Retrieved 16 February 2013.
- ^ "Baiduspider". Baidu.com. Archived from the original on 6 August 2013. Retrieved 16 February 2013.
- ^ "Robots Exclusion Protocol: joining together to provide better documentation". Blogs.bing.com. 3 June 2008. Archived from the original on 2014-08-18. Retrieved 16 February 2013.
- ^ "DuckDuckGo Bot". DuckDuckGo.com. Archived from the original on 16 February 2017. Retrieved 25 April 2017.
- ^ "Kagi Search KagiBot". Kagi Search. Archived from the original on 12 April 2024. Retrieved 20 November 2024.
- ^ a b "Webmasters: Robots.txt Specifications". Google Developers. Archived from the original on 2013-01-15. Retrieved 16 February 2013.
- ^ "Submitting your website to Yahoo! Search". Archived from the original on 2013-01-21. Retrieved 16 February 2013.
- ^ a b "Using robots.txt". Help.yandex.com. Archived from the original on 2013-01-25. Retrieved 16 February 2013.
- ^ "ArchiveBot: Bad behavior". wiki.archiveteam.org. Archive Team. Archived from the original on 10 October 2022. Retrieved 10 October 2022.
- ^ Jason Scott. "Robots.txt is a suicide note". Archive Team. Archived from the original on 2017-02-18. Retrieved 18 February 2017.
- ^ "Robots.txt meant for search engines don't work well for web archives | Internet Archive Blogs". blog.archive.org. 17 April 2017. Archived from the original on 2018-12-04. Retrieved 2018-12-01.
- ^ Jones, Brad (24 April 2017). "The Internet Archive Will Ignore Robots.txt Files to Maintain Accuracy". Digital Trends. Archived from the original on 2017-05-16. Retrieved 8 May 2017.
- ^ Koebler, Jason (2024-07-29). "Websites are Blocking the Wrong AI Scrapers (Because AI Companies Keep Making New Ones)". 404 Media. Retrieved 2024-07-29.
- ^ "Block URLs with robots.txt: Learn about robots.txt files". Archived from the original on 2015-08-14. Retrieved 2015-08-10.
- ^ "Robots.txt tells hackers the places you don't want them to look". The Register. Archived from the original on 2015-08-21. Retrieved August 12, 2015.
- ^ Scarfone, K. A.; Jansen, W.; Tracy, M. (July 2008). "Guide to General Server Security" (PDF). National Institute of Standards and Technology. doi:10.6028/NIST.SP.800-123. Archived (PDF) from the original on 2011-10-08. Retrieved August 12, 2015.
- ^ Sverre H. Huseby (2004). Innocent Code: A Security Wake-Up Call for Web Programmers. John Wiley & Sons. pp. 91–92. ISBN 9780470857472. Archived from the original on 2016-04-01. Retrieved 2015-08-12.
- ^ "List of User-Agents (Spiders, Robots, Browser)". User-agents.org. Archived from the original on 2014-01-07. Retrieved 2013-12-29.
- ^ "Access Control - Apache HTTP Server". Httpd.apache.org. Archived from the original on 2013-12-29. Retrieved 2013-12-29.
- ^ "Deny Strings for Filtering Rules : The Official Microsoft IIS Site". Iis.net. 2013-11-06. Archived from the original on 2014-01-01. Retrieved 2013-12-29.
- ^ "Google humans.txt". Archived from the original on January 24, 2017. Retrieved October 3, 2019.
- ^ "Github humans.txt". GitHub. Archived from the original on May 30, 2016. Retrieved October 3, 2019.
- ^ Newman, Lily Hay (2014-07-03). "Is This a Google Easter Egg or Proof That Skynet Is Actually Plotting World Domination?". Slate Magazine. Archived from the original on 2018-11-18. Retrieved 2019-10-03.
- ^ "/killer-robots.txt". 2018-01-10. Archived from the original on 2018-01-10. Retrieved 2018-05-25.
- ^ "To crawl or not to crawl, that is BingBot's question". 3 May 2012. Archived from the original on 2016-02-03. Retrieved 9 February 2016.
- ^ "How Google interprets the robots.txt specification". Google Search Central. 2024-05-23. Retrieved 2024-10-06.
- ^ "Change Googlebot crawl rate - Search Console Help". support.google.com. Archived from the original on 2018-11-18. Retrieved 22 October 2018.
- ^ "Yahoo! Search Blog - Webmasters can now auto-discover with Sitemaps". Archived from the original on 2009-03-05. Retrieved 2009-03-23.
- ^ "Robots.txt Specifications". Google Developers. Archived from the original on November 2, 2019. Retrieved February 15, 2020.
- ^ a b "Robots meta tag and X-Robots-Tag HTTP header specifications - Webmasters — Google Developers". Archived from the original on 2013-08-08. Retrieved 2013-08-17.
- ^ Koster, M.; Illyes, G.; Zeller, H.; Sassman, L. (September 2022). Robots Exclusion Protocol. Internet Engineering Task Force. doi:10.17487/RFC9309. RFC 9309. Proposed Standard. sec. 2.5: Limits.
- ^ "How Google Interprets the robots.txt Specification | Documentation". Google Developers. Archived from the original on 2022-10-17. Retrieved 2022-10-17.
Further reading
[edit]- Allyn, Bobby (5 July 2024). "Artificial Intelligence Web Crawlers Are Running Amok". All Things Considered. NPR. Archived from the original on 6 July 2024. Retrieved 6 July 2024.