Welcome to WebmasterWorld Guest from 54.167.0.111

Forum Moderators: goodroi

Message Too Old, No Replies

Robots.txt question

excluding every folder expect one

     

JVB_Mktg

7:22 pm on Mar 2, 2003 (gmt 0)

10+ Year Member



How can I have a bot ignore every directory in my site except one?

Do I have to disalow all of them 1 by 1 ie.

User-agent: bot
Disallow: /folder1/

User-agent: bot
Disallow: /folder2/

User-agent: bot
Disallow: /folder3/

User-agent: bot
Disallow: /folder4/ etc.. or is there an easier way.

I only need it to check www.mydomain.com/midi and exclude it from every other place.

TIA,

Javi

wilderness

7:33 pm on Mar 2, 2003 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Javi,
Welcome to Webmaster World.

It is imperative that you keep in mind that robots.txt is a SUGGESTION to bots of compliance.
Many bad bots don't even read robots.txt.

With the above in mind. . .

User-agent: *
Disallow: /

denies all bots.
I seem to recall that Allow is not valid protocol in robots'txt.

So your alyernatives are either to deny all or list each "1 by 1"

JVB_Mktg

7:46 pm on Mar 2, 2003 (gmt 0)

10+ Year Member



Thanks wilderness :)

weesnich

7:47 pm on Mar 2, 2003 (gmt 0)

10+ Year Member



User-agent: *
Disallow: /folder1
Disallow: /folder2
Disallow: /folder3
Disallow: /folder4
[empty line here]

should work.

It is better to disallow "/folder", as some SE assume that they are allowed to try "/folder" if you only disallow "/folder/", especially if you have some internal or incoming links pointing to "/folder".

Weesnich

JVB_Mktg

7:54 pm on Mar 2, 2003 (gmt 0)

10+ Year Member



Thanks weesnich, it looks a lot better now :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month