5/08/2555

มาตรฐานสําหรับการยกเว้นหุ่นยนต์


มาตรฐานสําหรับการยกเว้นหุ่นยนต์

สารบัญ:
สถานะของเอกสารนี้
การแนะนำ
วิธี
จัดรูปแบบ
ตัวอย่าง
รหัสตัวอย่าง
ที่อยู่ของผู้ใช้
สถานะของเอกสารนี้

เอกสารนี้เป็นความเห็นเป็นเอกฉันท์ที่ 30 มิถุนายน 1994 เมื่อรายชื่อที่ส่งหุ่นยนต์ (robots-request@nexor.co.uk) ระหว่างส่วนใหญ่ของผู้เขียนหุ่นยนต์และคนอื่น ๆ ที่มีความสนใจในหุ่นยนต์ มันก็มีที่เปิดสำหรับการอภิปรายเกี่ยวกับเวิลด์ไวด์ทางเทคนิครายชื่อที่ส่งเว็บ (www-talk@info.cern.ch) เอกสารนี้จะขึ้นอยู่กับร่างที่ทำงานก่อนหน้านี้ภายใต้ชื่อเดียวกัน
มันไม่ได้เป็นมาตรฐานอย่างเป็นทางการได้รับการสนับสนุนโดยองค์กรด้านมาตรฐานหรือเป็นเจ้าของโดยองค์กรการค้าใด ๆ มันไม่ได้ถูกบังคับใช้โดยใครและไม่มีการรับประกันว่าทุกหุ่นยนต์ในปัจจุบันและในอนาคตจะใช้มันไม่มี คิดซะว่ามันเป็นสถานที่ที่พบส่วนใหญ่ของผู้เขียนหุ่นยนต์ให้กับชุมชนดูรายละเอียดในการปกป้องเซิร์ฟเวอร์ WWW กับจำนวนที่ไม่พึงประสงค์โดยหุ่นยนต์ของพวกเขา

รุ่นล่าสุดของเอกสารฉบับนี้สามารถพบได้บน http://www.robotstxt.org/wc/robots.html .

การแนะนำ

หุ่นยนต์ดูรายละเอียด (เรียกว่าหลงมาหรือไปเดอร์) เป็นโปรแกรมที่เข้าไปหลาย ๆ หน้าในเวิลด์ไวด์เว็บโดย recursively เรียกหน้าเว็บที่เชื่อมโยง สำหรับข้อมูลเพิ่มเติมโปรดดูที่หน้าหุ่นยนต์ .
ในปี 1993 และ 1994 มีโอกาสที่หุ่นยนต์ที่ได้เยี่ยมชมเซิร์ฟเวอร์ WWW ที่พวกเขาไม่ต้อนรับด้วยเหตุผลต่างๆ บางครั้งหุ่นยนต์โดยเฉพาะหุ่นยนต์บางอย่างเช่นถูกด้วยเหตุผลเหล่านี้ล้นมือเซิร์ฟเวอร์ที่มีการร้องขออย่างรวดเร็วดับเพลิงหรือดึงไฟล์เดียวกันซ้ำ ๆ ในสถานการณ์อื่น ๆ ในหุ่นยนต์เดินทางข้ามส่วนของเซิร์ฟเวอร์ WWW ที่ไม่เหมาะสมเช่นลึกมากต้นไม้เสมือนข้อมูลซ้ำข้อมูลชั่วคราวหรือสคริปต์ CGI ที่มีผลข้างเคียง-(เช่นการลงคะแนน)

เหตุการณ์เหล่านี้แสดงให้เห็นความจำเป็นในการจัดตั้งกลไกสำหรับเซิร์ฟเวอร์ WWW เพื่อแสดงให้หุ่นยนต์ส่วนของเซิร์ฟเวอร์ของพวกเขาไม่ควรจะเข้าถึงได้ มาตรฐานนี้อยู่ต้องนี้มีวิธีการแก้ปัญหาการดำเนินงาน

วิธีที่

วิธีการที่ใช้เพื่อยกเว้นหุ่นยนต์จากเซิร์ฟเวอร์คือการสร้างแฟ้มบนเซิร์ฟเวอร์ที่ระบุนโยบายการเข้าถึงสำหรับหุ่นยนต์ ไฟล์นี้ต้องสามารถเข้าถึงได้ผ่านทาง HTTP ที่ URL ท้องถิ่น " / robots.txt " เนื้อหาของแฟ้มนี้มีการระบุไว้ด้านล่าง .
วิธีการนี​​้ได้รับเลือกเพราะมันสามารถดำเนินการได้อย่างง่ายดายบนเซิร์ฟเวอร์ WWW ใด ๆ ที่มีอยู่และหุ่นยนต์สามารถหานโยบายการเข้าถึงโดยเฉพาะการดึงเอกสารเดียว

ข้อเสียเปรียบที่เป็นไปได้จากรายการนี​​้รายการเดียวที่แฟ้มวิธีคือเฉพาะผู้ดูแลเซิร์ฟเวอร์สามารถรักษาเช่นรายการที่ไม่ maintainers เอกสารส่วนบุคคลบนเซิร์ฟเวอร์ นี้สามารถแก้ไขได้โดยกระบวนการภายในประเทศเพื่อสร้างไฟล์เดียวจากจำนวนของผู้อื่น แต่ถ้าหรือวิธีการนี​​้จะกระทำอยู่นอกขอบเขตของเอกสารนี้

ทางเลือกของ URL ถูกกระตุ้นโดยเกณฑ์หลายประการ:

ชื่อไฟล์ควรจะพอดีกับข้อ จำกัด ในการตั้งชื่อไฟล์ของระบบปฏิบัติการทั้งหมดที่พบโดยทั่วไป
ส่วนขยายของแฟ้มไม่ควรต้องตั้งค่าเซิร์ฟเวอร์พิเศษ
ชื่อไฟล์ควรระบุวัตถุประสงค์ของแฟ้มและจะง่ายต่อการจำ
โอกาสในการปะทะกับไฟล์ที่มีอยู่ควรจะน้อยที่สุด
รูปแบบ

รูปแบบและความหมายของ " robots.txt /แฟ้ม "มีดังนี้
ไฟล์ประกอบด้วยหนึ่งหรือมากกว่าหนึ่งระเบียนคั่นด้วยหนึ่งหรือหลายเส้นที่ว่างเปล่า (ยกเลิกโดย CR, CR / NL หรือ NL) แต่ละระเบียนจะประกอบด้วยเส้นของรูปแบบ " <field>: <optionalspace> <value> <optionalspace> " ชื่อเขตข้อมูลเป็นกรณีตาย

ความเห็นสามารถรวมอยู่ในไฟล์โดยใช้ UNIX ประชุมบอร์นเชลล์: ' #ตัวละครจะถูกใช้เพื่อบ่งชี้ว่าพื้นที่ก่อนหน้านี้ (ถ้ามี) และที่เหลือของสายได้ถึงการสิ้นสุดบรรทัดจะถูกยกเลิก เส้นที่มีเพียงความคิดเห็นจะถูกยกเลิกอย่างสมบูรณ์และดังนั้นจึงไม่ได้แสดงว่าขอบเขตการบันทึก

บันทึกเริ่มต้นด้วยหนึ่งหรือUser-agent บรรทัดตามด้วยหนึ่งหรือไม่อนุญาตให้ใช้เส้นตามรายละเอียดด้านล่างนี้ ส่วนหัวไม่รู้จักจะถูกละเลย

User-agent
ค่าของเขตข้อมูลนี้เป็นชื่อของหุ่นยนต์บันทึกจะถูกอธิบายนโยบายการเข้าถึงสำหรับ
หากมากกว่าหนึ่งเขตข้อมูล User-agent เป็นปัจจุบันระเบียนอธิบายนโยบายการเข้าถึงเหมือนกันมากกว่าหนึ่งหุ่นยนต์ อย่างน้อยหนึ่งเขตข้อมูลความต้องการที่จะนำเสนอต่อที่บันทึก

หุ่นยนต์ควรจะใจกว้างในการตีความด้านนี้ การจับคู่ substring กรณีตายของชื่อโดยไม่มีข้อมูลรุ่นที่แนะนำ

ถ้าค่าเป็น ' * ', บันทึกอธิบายนโยบายการเข้าถึงเริ่มต้นสำหรับหุ่นยนต์ใด ๆ ที่ไม่ได้จับคู่ใด ๆ ของระเบียนอื่น ๆ มันไม่ได้รับอนุญาตให้มีการบันทึกดังกล่าวหลายคนใน " robots.txt /แฟ้ม "

ไม่อนุญาต
ค่าของฟิลด์นี้จะระบุ URL บางส่วนที่ไม่ได้ที่จะเข้าชม ซึ่งจะเป็นเส้นทางที่เต็มหรือเส้นทางบางส่วน; URL ที่เริ่มต้นด้วยมูลค่าธุรกรรมดังกล่าวจะไม่สามารถเรียกคืน ตัวอย่างเช่นDisallow: / help ปิดทั้งสอง/ help.htmlและ / help / index.htmlในขณะที่ ไม่อนุญาต: ช่วยเหลือ / /จะไม่อนุญาตให้ / help / index.html แต่อนุญาตให้help.html / .
ค่าใด ๆ ที่ว่างเปล่าบ่งชี้ว่า URL ทั้งหมดสามารถเรียกดูได้ อย่างน้อยหนึ่งเขตข้อมูลไม่อนุญาตให้ใช้ความต้องการที่จะนำเสนอในการบันทึก

การปรากฏตัวของว่าง " robots.txt /ไฟล์ "มีความหมายที่เกี่ยวข้องยังไม่มีที่ชัดเจนก็จะได้รับการปฏิบัติราวกับว่ามันไม่ได้ในปัจจุบันคือหุ่นยนต์ทั้งหมดจะพิจารณาตัวเองต้อนรับ
ตัวอย่าง

ตัวอย่างต่อไปนี้ " robots.txt /แฟ้ม "ระบุว่าหุ่นยนต์ไม่ควรเข้าเยี่ยมชม URL ที่ขึ้นต้นด้วย" ใด ๆ/ cyberworld / แผนที่ / "หรือ" / tmp / "หรือ/ foo.html :
# robots.txt สำหรับ http://www.example.com/

User-agent: *
Disallow: / cyberworld / แผนที่ / # นี้พื้นที่ URL อนันต์เสมือนเป็น
Disallow: / tmp / # เหล่านี้จะหายไปเร็ว ๆ นี้
Disallow: / foo.html
ตัวอย่างนี้ " robots.txt /แฟ้ม "ระบุว่าหุ่นยนต์ไม่ควรเข้าเยี่ยมชม URL ที่ขึ้นต้นด้วย" ใด ๆ/ cyberworld / แผนที่ / "ยกเว้นหุ่นยนต์ที่เรียกว่า" cybermapper ":
# robots.txt สำหรับ http://www.example.com/

User-agent: *
Disallow: / cyberworld / แผนที่ / # นี้พื้นที่ URL อนันต์เสมือนเป็น

Cyber​​mapper # รู้ที่จะไป
User-agent: cybermapper
ไม่อนุญาต:
ตัวอย่างนี้แสดงให้เห็นว่าหุ่นยนต์ไม่ควรเข้าเยี่ยมชมเว็บไซต์นี้ต่อไป:
# หายไป
User-agent: *
Disallow: /
รหัสตัวอย่าง

แม้ว่ามันจะไม่ใช่ส่วนหนึ่งของข้อกำหนดนี้โค้ดตัวอย่างบางส่วนใน Perl สามารถใช้ได้ใน norobots.pl มันเป็นบิตมีความยืดหยุ่นในการแยกของมันกว่านี้ specificies เอกสารและมีการให้ตามสภาพโดยไม่มีการรับประกัน



8voFf
8voff nvlv'





Table of contents:
Status of this document
Introduction
Method
Format
Examples
Example Code
Author's Address
Status of this document

This document represents a consensus on 30 June 1994 on the robots mailing list (robots-request@nexor.co.uk), between the majority of robot authors and other people with an interest in robots. It has also been open for discussion on the Technical World Wide Web mailing list (www-talk@info.cern.ch). This document is based on a previous working draft under the same title.
It is not an official standard backed by a standards body, or owned by any commercial organisation. It is not enforced by anybody, and there no guarantee that all current and future robots will use it. Consider it a common facility the majority of robot authors offer the WWW community to protect WWW server against unwanted accesses by their robots.
The latest version of this document can be found on http://www.robotstxt.org/wc/robots.html.
Introduction

WWW Robots (also called wanderers or spiders) are programs that traverse many pages in the World Wide Web by recursively retrieving linked pages. For more information see the robots page.
In 1993 and 1994 there have been occasions where robots have visited WWW servers where they weren't welcome for various reasons. Sometimes these reasons were robot specific, e.g. certain robots swamped servers with rapid-fire requests, or retrieved the same files repeatedly. In other situations robots traversed parts of WWW servers that weren't suitable, e.g. very deep virtual trees, duplicated information, temporary information, or cgi-scripts with side-effects (such as voting).
These incidents indicated the need for established mechanisms for WWW servers to indicate to robots which parts of their server should not be accessed. This standard addresses this need with an operational solution.
The Method

The method used to exclude robots from a server is to create a file on the server which specifies an access policy for robots. This file must be accessible via HTTP on the local URL "/robots.txt". The contents of this file are specified below.
This approach was chosen because it can be easily implemented on any existing WWW server, and a robot can find the access policy with only a single document retrieval.
A possible drawback of this single-file approach is that only a server administrator can maintain such a list, not the individual document maintainers on the server. This can be resolved by a local process to construct the single file from a number of others, but if, or how, this is done is outside of the scope of this document.
The choice of the URL was motivated by several criteria:
The filename should fit in file naming restrictions of all common operating systems.
The filename extension should not require extra server configuration.
The filename should indicate the purpose of the file and be easy to remember.
The likelihood of a clash with existing files should be minimal.
The Format

The format and semantics of the "/robots.txt" file are as follows:
The file consists of one or more records separated by one or more blank lines (terminated by CR,CR/NL, or NL). Each record contains lines of the form "<field>:<optionalspace><value><optionalspace>". The field name is case insensitive.
Comments can be included in file using UNIX bourne shell conventions: the '#' character is used to indicate that preceding space (if any) and the remainder of the line up to the line termination is discarded. Lines containing only a comment are discarded completely, and therefore do not indicate a record boundary.
The record starts with one or more User-agent lines, followed by one or more Disallow lines, as detailed below. Unrecognised headers are ignored.
User-agent
The value of this field is the name of the robot the record is describing access policy for.If more than one User-agent field is present the record describes an identical access policy for more than one robot. At least one field needs to be present per record.
The robot should be liberal in interpreting this field. A case insensitive substring match of the name without version information is recommended.
If the value is '*', the record describes the default access policy for any robot that has not matched any of the other records. It is not allowed to have multiple such records in the "/robots.txt" file.
Disallow
The value of this field specifies a partial URL that is not to be visited. This can be a full path, or a partial path; any URL that starts with this value will not be retrieved. For example, Disallow: /helpdisallows both /help.html and /help/index.html, whereas Disallow: /help/ would disallow /help/index.htmlbut allow /help.html.Any empty value, indicates that all URLs can be retrieved. At least one Disallow field needs to be present in a record.
The presence of an empty "/robots.txt" file has no explicit associated semantics, it will be treated as if it was not present, i.e. all robots will consider themselves welcome.
Examples

The following example "/robots.txt" file specifies that no robots should visit any URL starting with "/cyberworld/map/" or "/tmp/", or /foo.html:
# robots.txt for http://www.example.com/

User-agent: *
Disallow: /cyberworld/map/ # This is an infinite virtual URL space
Disallow: /tmp/ # these will soon disappear
Disallow: /foo.html
This example "/robots.txt" file specifies that no robots should visit any URL starting with "/cyberworld/map/", except the robot called "cybermapper":
# robots.txt for http://www.example.com/

User-agent: *
Disallow: /cyberworld/map/ # This is an infinite virtual URL space

# Cybermapper knows where to go.
User-agent: cybermapper
Disallow:
This example indicates that no robots should visit this site further:
# go away
User-agent: *
Disallow: /
Example Code

Although it is not part of this specification, some example code in Perl is available in norobots.pl. It is a bit more flexible in its parsing than this document specificies, and is provided as-is, without warranty.