robots.txt로 검색봇(서치봇)을 차단해 사이트 트래픽 줄이기

· 조회수 14

robots.txt를 설정해두어야 검색봇(서치봇)으로 인한 과도한 트래픽으로 사이트 접속이 원활하지 않은 상황을 미리 예방할 수가 있습니다.
특히 웹호스팅의 경우 트래픽 초기화에 비용이 지출되는데 하루나 이틀이면 몰라도 몇날 며칠 지속될 경우 불필요한 지출을 하게 됩니다.
모 SNS와 모 전자상거래 사이트 서치봇의 경우 악질중의 악질이라고 해도 과언이 아닐 정도니 사이트 오픈 초기거나 검색없이도 충분히 방문자수를 확보할 수 있는 경우를 제외하고는 메이저 검색봇 이외의 검색봇 차단을 해주는게 나름 이득일 경우가 많습니다.

User-Agent : *
Disallow : /
User-Agent : Googlebot
User-Agent : Yeti
User-Agent : Slurp
User-Agent : Daum
User-Agent : Googlebot-image
User-Agent : Googlebot-mobile
User-Agent : yahoo-slurp
User-Agent : Daumoa
User-Agent : Bingbot
User-Agent : Zumbot
User-Agent : Yandex
Allow : /

위 예제 소스를 메모장에 붙여넣기 한후 robots.txt로 저장하고 홈페이지 루트(홈디렉토리)에 올려놓으시면 됩니다.

간단히 설명을 드리자면
User-Agent : * #일단 모든 서치엔진
Disallow : / # 전체 디렉토리 접근금지

User-Agent : Googlebot #구글
User-Agent : Yeti #네이버
User-Agent : Slurp #야후
User-Agent : Daum #다음
User-Agent : Googlebot-image #구글이미지
User-Agent : Googlebot-mobile #구글모바일
User-Agent : yahoo-slurp #야후
User-Agent : Daumoa #다음
User-Agent : Bingbot #빙
User-Agent : Zumbot #줌
User-Agent : Yandex #얀덱스
Allow : / # 전체 디렉토리 접근허용(앞에 서술된 구글, 네이버, 야후, 다음, 빙, 줌, 얀덱스)

예제는 전체 디렉토리 접근금지/접근으로 해놓았는데 실제로 세부적인 디렉토리 설정을 할 수도 있습니다.

"모든 과학은 물리학 아니면 우표수집이다. - 어니스트 러더퍼드 All science is either physics or stamp collecting. - Ernest Rutherford"

- 과학 -

북마크목록