User-agent: *

Disallow: /

복사해서 robots.txt파일로 만들어 계정 루트에 올리면 끝입니다.

 

사용법 강좌

한글 http://tagin.net/bbs/view.php?id=server&no=9

영문 http://www.robotstxt.org/ 

 

그 외 메타태그 이용법

<meta name="robots" content="noindex,nofollow">


1. Robots.txt

1.1. 정의

 : 로봇 배제 표준은 웹 사이트에 로봇이 접근하는 것을 방지하기 위한 규약으로 일반적으로 접근 제한에 대한 설명을 robots.txt에 기술한다.

   아직 이 규약에 대한 RFC는 없다.

   이 규약은 권고안이며, 로봇이 robots.txt파일을 읽고 접근을 중지하는 것을 목적으로 한다.

   따라서 접근 방지 설정을 하였다고 해도, 다른 사람드링 그 파일에 접근할 수 있다.

 

robots.txt 파일은 웹을 크롤링하는 검색엔진 로봇이 사이트에 액세스하는 것을 제한합니다. 검색 로봇은 자동으로 작동하며 한 사이트의 페이지에 액세스하기 전에 특정 페이지에 대한 액세스를 차단하는 robots.txt 파일이 있는지 여부를 확인합니다. 일부 로봇은 명령어를 다르게 해석할 수도 있지만 잘 제작된 모든 로봇은 robots.txt 파일의 명령어를 그대로 따릅니다. 그러나 robots.txt는 강제성을 띄지 않으므로 일부 스팸 발송자나 다른 악의적인 사용자는 이 파일의 명령어를 무시할 수 있습니다. 따라서 기밀 정보 보호를 위해 비밀번호를 사용하는 것이 좋습니다.

robots.txt 파일은 검색엔진을 통해 색인을 생성하지 않으려는 콘텐츠가 사이트에 포함되어 있는 경우에만 필요합니다. 검색엔진이 사이트의 모든 콘텐츠에 대한 색인을 생성하도록 하려면 robots.txt 파일이 필요 없으며 빈 파일도 마찬가지입니다.

Google은 robots.txt에 의해 차단된 페이지의 콘텐츠는 크롤링하거나 색인을 생성하지 않지만, 웹의 다른 페이지에서 해당 페이지의 콘텐츠를 찾은 경우에는 여전히 URL의 색인을 생성할 수 있습니다. 따라서 페이지의 URL 및 사이트 링크의 앵커 텍스트나 오픈 디렉토리 프로젝트(Open Directory Project)(www.dmoz.org)의 제목과 같은 공개 정보가 Google 검색결과에 나타날 수 있습니다.

robots.txt 파일을 사용하려면 도메인의 루트 액세스 권한이 있어야 합니다. 권한이 있는지 확실하지 않으면 웹호스팅 업체에 문의하시기 바랍니다. 도메인의 루트에 대한 액세스 권한이 없는 경우에는 로봇 메타태그를 사용하여 액세스를 제한할 수 있습니다.

 

1.2 간단한 예

1) 모든 Crawler의 접근을 차단

User-agent: *

Disallow: /

2) 모든 Crawler의 접근을 허용

User-agent: *

Allow: /

 

3) 모든 Crawler에 대해 1개의 폴더만 접근을 차단

User-agent: *

Disallow: /cgi-bin/

 

4) 특정 Crawler에 대해서만 하나의 폴더의 접근을 차단

User-agent: BadBot #차단 하고자 하는 Crawler

Disallow: /private/

 

5) 특정 디렉토리 안의 하나의 파일만 접근을 허용하고 나머진 접근을 차단

Allow: /folder1/myfile.html

Disallow: /folder1/

--> 순서 중요

 

1.3 The Elements of Robots.txt
User-agent

    The User-agent is the name of the client (browser or robot), sent as part of an HTTP request (as set in the HTTP RFC). It will appear in web site log files with version number and name such as Internet Explorer, Opera, or Mozilla (browsers), or Slurp, Googlebot, or MSNBot (search engine robots). In a robots.txt file, directives may be aimed at all robot clients (User-agent: *) or at a specific one (User-agent: slurp). In addition to browsers and the three biggest webwide search engines, many other robots may request content from a site. (See links to listings of User-agents)

Disallow

    Directive indicates that robots should not access the specific directory, subdirectory or file. This has been expressed as either a full URL path from the root directory or a right-truncated string (in the original REP), while the new REP supports now wildcards for URL paths.

    User-Agent: googlebot

    Disallow: /corrected-pages-old-versions/

    More examples

Allow

    This directive specifically allows robots to follow certain paths when crawling. This means you can Allow a section of a site, and Disallow a specific subsection. Here's an example that combines these concepts, applied to all robot crawlers:

    User-Agent: *

    Allow: /products/specsheets/

    Disallow: /products/printable/

    Allow: /products/printable/cartoons/
       

    Allow: /forum/

    Disallow: /forum/calendar_week.asp  

    While the previous robot exclusion protocol assumed that anything not disallowed was allowed, the new rules makes it more explicit. All three major web search engines plan to compare URLs to all directives, and apply the directive in the longest matching path, (such as "cartoons" in the example above), and indicate that the order in the robots.txt file doesn't matter.

Wildcards

    Wildcards, typed as asterisks (*), are used to specify any number of characters (including zero), in the URL paths. They make it easy to use patterns to direct the robots to the parts of a site that should be indexed, but keep them away from areas that should not. The $ character specifies that the pattern matched must be at the end of the file path.

    Disallow: *.doc$  

    Disallow: /research/*/old_version/*

    Allow: /research/findings/*

    Note that wildcards can be tricky, as some strings that seem obvious may unexpectedly match other strings (e.g. "path" and "pathetic"). Simplicity in using wildcards depends a great deal on your site URL structure and information architecture. SearchTools.com will be setting up a robots wildcard test suite and will report on the results.

Sitemap location

    Sitemaps are more than just lists of URLs in XML formats. They can contain information about specific pages, such as the last modified date, which is helpful if your web server doesn't keep proper track of content change dates, as well as that page's expected change frequency. A priority tag tells the crawler which pages you think are most important, although it's unlikely that any of the larger search engines will use that for relevance ranking or even recrawl control. Sitemaps.org has a complete schema and details about the options.

    Sitemap: http://example.com/mainsitemap.xml

Yahoo and MS Live Robots Only

    Crawl-Delay

        Allows sites to set a limit on the robot crawl rate. It's useful if the site cannot handle multiple requests per second, perhaps because the speed of the robot crawling is slowing down transactions for customers or other users. This can be done for each User-agent section, and the number is a single decimal place amount of time in seconds. So to tell Yahoo to only send one request every three seconds, use the number 3 (Yahoo instructions)

        User-agent: Slurp

        Crawl-delay: 3.0

        To tell Microsoft Live Search to send two requests per second, use 0.5 (MSN instructions)

        User-agent: MSNBot

        Crawl-delay: 0.5

 

2. What if I cannot make a /robots.txt?

    The basic idea is that if you include a tag like:

    <META NAME="ROBOTS" CONTENT="NOINDEX">

    in your HTML document, that document won't be indexed.










이전버튼 1 2 3 4 5 ... 9 이전버튼




 
Admin    Write




믹시