Skip to content

robots.txt 관련 Tip.

Tip 조회 수 9507 추천 수 0 2013.05.30 01:12:35

구글 로봇이나 구글 이미지 로봇,구글 모바일웹 로봇 등 구글에서만도 상당수의 봇이 사이트의 게시물를 긁어가는데요


이때 발생되는 트래픽이 어마어마(!)하게 느껴질때가 있습니다.


물론, 게시물를 많이 가져가면 갈수록 SEO 에 좋긴 하겠지만, 일반적인 서민들이 운영하는 개인홈페이지에서는 쥐약일수도 있죠.


헌데, robots.txt 작성을 통해


User-agent:Googlebot-Image

Disallow: /


이런식으로 차단하거나, 혹은 아래와 같이 특정봇을 차단하고 나머지 봇에 대한 접근 금지 폴더를 정해주기도 하죠.


User-agent:bingbot
Disallow: /
User-agent:msnbot
Disallow: /
User-agent:Googlebot-Image
Disallow: /
User-agent: *
Disallow: /adm/
Allow: /


헌데,이러한 방법들이 검색엔진최적화 [search engine optimization, SEO]에 좋지 않은 영향을 미친다고 하네요.


그래서, 프로그램단에서 처리를 할수 있지 않을까 했습니다. 아래처럼 말이죠.(참조)


<?
// robots
function isRobots()
{
$is_robot == false;
$robot_array = array('Yeti','cowbot','psbot','bingbot','msnbot','Slupr','YATS crawler','Yahoo! Slurp','Daumoa','EtaoSpider','Sosospider','libcurl','Python-urllib');
foreach($robot_array as $robot)
{
$is_robot = strpos($_SERVER['HTTP_USER_AGENT'], $robot);
if($is_robot !== false) {
return true;
}
}
return false;
}
?>



profile

I see no changes, wake up in the morning and I ask myself

Is life worth living should I blast myself

Things would never be the same.

태그
엮인글 :
http://adminplay.com/205939/6b8/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234