The Proper Way To Use The Robot.txt File

Get Help With All Aspects of Web Design & Design Software

Moderators: Moderator, Global Moderator

Post Reply
Tami
Administrator
Administrator
Posts: 10892
Joined: Sun Apr 25, 2004 1:05 pm

The Proper Way To Use The Robot.txt File

Post by Tami »

The Proper Way To Use The Robot.txt File
By Jimmy Whisenhunt

When optimizing your web site most webmasters don\'t consider using the robot.txt file.

This is a very important file for your site. It let the spiders and crawlers know what they can and can not index. This is helpful in keeping them out of folders that you do not want index like the admin or stats folder.

Here is a list of variables that you can include in a robot.txt file and there meaning:

1. User-agent: In this field you can specify a specific robot to describe access policy for or a \"*\" for all robots more explained in example.

2. Disallow: In the field you specify the files and folders not to include in the crawl.

3. The # is to represent comments

Here are some examples of a robot.txt file

User-agent: *
Disallow:

The above would let all spiders index all content.

Here another

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

The above would block all spiders from indexing the cgi-bin directory.

User-agent: googlebot
Disallow:

User-agent: *
Disallow: /admin.php
Disallow: /cgi-bin/
Disallow: /admin/
Disallow: /stats/

In the above example googlebot can index everything while all other spiders can not index admin.php, cgi-bin, admin, and stats directory. Notice that you can block single files like admin.php.

About the Author:
Jimmy Whisenhunt is the webmaster at VIP Enterprises [url=\"http://www.vipenterprises.org\"]http://www.vipenterprises.org[/url]

[url=\"http://www.devwebpro.com/\"]source[/url]
Image

[color=\"#41211C\"]It takes years to build up trust and only seconds to destroy it

[/color]
Josh
Hero Member
Hero Member
Posts: 4627
Joined: Fri Jun 04, 2004 2:54 pm

The Proper Way To Use The Robot.txt File

Post by Josh »

Thank you for posting this /blum.gif\' class=\'bbc_emoticon\' alt=\':P\' /> Didn\'t want to go on google to search for it either lol

now question....Robot.txt goes in your root directory of your website, correcta?
Last edited by Josh on Sun Feb 13, 2005 2:51 pm, edited 1 time in total.
[align=center]

Image

“If you stop learning, you stop living.” ~Tami Quiring

“It's the rare man who understands the value of a single perfect rose.”

[/align]
Sp3culuM
Hero Member
Hero Member
Posts: 662
Joined: Mon May 17, 2004 2:36 pm

The Proper Way To Use The Robot.txt File

Post by Sp3culuM »

Yes Josh /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
Image
Josh
Hero Member
Hero Member
Posts: 4627
Joined: Fri Jun 04, 2004 2:54 pm

The Proper Way To Use The Robot.txt File

Post by Josh »

kk, thanks!
[align=center]

Image

“If you stop learning, you stop living.” ~Tami Quiring

“It's the rare man who understands the value of a single perfect rose.”

[/align]
Post Reply

Return to “Web Design Principles”