The proper way to use the robot.txt file

When optimizing your web site most webmastersThe above would let all spiders index all content.
don't consider using the robot.txt file. This is a veryHere another
important file for your site. It let the spiders andUser-agent: *
crawlers know what they can and can not index. ThisDisallow: /cgi-bin/
is helpful in keeping them out of folders that you do notThe above would block all spiders from indexing the
want index like the admin or stats folder or contentcgi-bin directory.
that they can not index.User-agent: googlebot
Here is a list of variables that you can include in aDisallow:
robot.txt file and there meaning:User-agent: *
1)User-agent: In this field you can specify a specificDisallow: /admin.php
robot to describe access policy for or a "*" for allDisallow: /cgi-bin/
robots more explained in example.Disallow: /admin/
2)Disallow: In the field you specify the files and foldersDisallow: /stats/
not to include in the crawl.In the above example googlebot can index everything
3)# the number sign represents commentswhile all other spiders can not index admin.php, cgi-bin,
Here are some examples of a robot.txt file foradmin, and stats directory. Notice that you can block
User-agent: *single files like admin.php.
Disallow: