Printable version
SEO Toolkit 2
Keyword Research
Site optimization
  The robots.txt file
Search engine submission
Reporting and revision
Domain Manager
 
SEO Toolkit 2

The robots.txt file



A spider is an automated program that is used by search engines to find and index the contents of a website.

Spiders will look in a site's root domain for a special file named "robots.txt". The file provides information to the robot (spider) regarding the files and directories that it may or may not index or crawl.

The format for the robots.txt file consists of multiple records. Each record contains two fields, a user-agent specification and one or more Disallow statements. The format is:

User-agent:<robot name>
Disallow:<statements>


User-agent

The User-agent line specifies the robot name. For example:

User-agent: googlebot

You may also use the wildcard character "*" to specify all robots. For example

User-agent: *

You can find user agent names in your site's logs by checking for requests to the robots.txt file.



Disallow:

The second part of a record consists of Disallow: statements. These statements specify files and/or directories. For example, the following line instructs spiders that they cannot index the email.htm file:

Disallow: email.htm


You may also specify directories:
Disallow: /cgi-bin/

Leaving the Disallow statement blank implies that the robot can index any files without restriction. At least one disallow line must be present for each User-agent directive to be valid. A blank robots.txt file is treated as if it were non existent.



Examples

The following example allows all robots to index all files:

User-agent: *
Disallow:



The following example denies access to all robots:

User-agent: *
Disallow: /



The following example denies all robots access to the cgi-bin and images directories:

User-agent: *
Disallow: /cgi-bin/
Disallow: /images/



The following example denies googlebot access to all files:

User-agent: googlebot
Disallow: /



For more complex examples, view the robots.txt files from other websites.

The robots.txt file should be created in a plain text editor. htm, .html, .rtf or any file format other than .txt is not acceptable.