RadarURL

robots.txt 파일(로봇배제 표준)

by JaeSoo posted Apr 11, 2014
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

로봇배제 표준이란?
구글등 검색 로봇이 정보수집을 위해 사이트를 방문할 경우를 대비하여, 검색로봇에 대한 웹사이트의 디렉토리 및 파일 들에 대한 검색조건을 명시해 놓은 국제 규약이다.

• 정상적인 검색로봇은 사이트 방문시 가장 먼저 웹사이트의 로봇배제 표준파일(robots.txt)를 확인하고, 파일에 명시된 사항을 준수하면서 웹사이트의 컨텐츠를 수집한다.
• robots.txt 화일에는 최소한 한개의 Disallow 필드(field)가 있어야 한다.

로봇 배제 표준은 방지기술이 아닌 사이트 및 검색로봇 운영자간의 단순한 약속(규약)이므로 악의적인 로봇이 로봇 배제 표준을 무시하고 사이트의 컨텐츠를 수집할 수 도 있다.

robots.txt의 내용은 다음과 같은 의미로 사용된다.

User-agent: *은 모든 User-agent이고,
특정 user-agent를 지정할 경우 해당 로봇 이름을 지정
Allow or Disallow: disallow에서
/은 모든 하위 문서에 대해 배재를 의미하고,
아무것도 지정하지 않으면 허가를 의미

/arirang/는 arirang 디렉토리만,
/arirang은 arirang 디렉토리와 그 디렉토리내의 파일이 적용대상임

노출 허용/금지 의도 robots.txt 타이틀 robots.txt 내용
홈페이지 전체 내용을 모든 검색엔진에 노출을 허용 User-agent: *
Disallow:
홈페이지 전체 내용을 모든 검색엔진에 노출을 방지 User-agent: *
Disallow: /
홈페이지 디렉토리가 information인 것에 대한 노출을 방지 User-agent: *
Disallow: /information/
특정 검색엔진(abcbot)의 접근만을 거부 User-agent: abcbot
Disallow: /
User-agent: *
Disallow:
특정 검색엔진(abcbot)의 접근만을 허용 User-agent: abcbot
Disallow:
User-agent: *
Disallow: /
모든 검색엔젠에 대해 /directory/a.html의 접근을 거부 User-agent: *
Disallow: /directory/a.html
홈페이지의 디렉토리가 information인 것에 대한 노출을 허가 User-agent: *
Disallow: /information/
홈페이지의 디렉토리 또는 파일명이 information인 것에 대한 접근을 허가 User-agent: *
Disallow: /information

【예제】
# pwd
/export/home/apache2/htdocs
# ls
favicon.ico     index.html      left.html       right.html      sounds
images          lecture         netsarang.html  robots.txt
# cat robots.txt
user-agent:*
disallow:
#


http://www.robotstxt.org/ 참조

 

출처 : http://radiocom.kunsan.ac.kr/lecture/home_page/robots_txt.html


Articles

1 2 3 4