웹검색 로봇 접근금지

웹봇이 접근하여 홈페이지에 접속하여 서버쪽 부하를 줄 경우이거나

웹페이지로의 검색이 되지 않게 할경우,
이용하는 방법입니다.

 

robots.txt파일을 만들어 아래내용을 입력합니다.

User-agent: *
Disallow: /

 

위 두줄을 입력하고 저장후 서버내 상위디렉토리에 넣어두면 됩니다.
User-Agent: 이곳은 접금금지할 프로그램을 입력하면 됩니다. ( * 은 모두 )

 

 

만약 모든 로봇에게 문서 접근을 허락하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: *
Allow: /


모든 로봇을 차단하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: *
Disallow: /


모든 로봇에 세 디렉터리 접근을 차단하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /junk/


모든 로봇에 특정 파일 접근을 차단하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: *
Disallow: /directory/file.html


BadBot 로봇에 모든 파일 접근을 차단하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: BadBot
Disallow: /


BadBot 과 Googlebot 로봇에 특정 디렉터리 접근을 차단하려면, robots.txt에 다음과 같이 입력하면 된다.

User-agent: BadBot
User-agent: Googlebot
Disallow: /private/


다양하게 조합하여 사용 할 수 있다.

User-agent: googlebot        # googlebot 로봇만 적용
Disallow: /private/        # 이 디렉토리를 접근 차단한다.

User-agent: googlebot-news        # googlebot-news 로봇만 적용
Disallow: /        # 모든 디렉토리를 접근 차단한다.

User-agent: *        # 모든 로봇 적용
Disallow: /something/        # 이 디렉토리를 접근 차단한다

'컴퓨터, 인터넷' 카테고리의 다른 글

gif파일을 ico파일로 변환  (0) 2017.04.13
윈도우 단축키  (0) 2017.04.12
각종 파일 확장자  (0) 2017.04.11
한글입력안될때  (0) 2017.04.11
내컴퓨터 시작프로그램 설정하기  (0) 2017.04.11




+ Recent posts