Welcome to WebmasterWorld Guest from 54.242.206.44

Forum Moderators: goodroi

Message Too Old, No Replies

Robots.txt question

excluding every folder expect one

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

Junior Member

10+ Year Member

joined:Jan 5, 2003
posts:63
votes: 0


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

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

Senior Member

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

joined:Nov 11, 2001
posts:5431
votes: 2


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"

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

Junior Member

10+ Year Member

joined:Jan 5, 2003
posts:63
votes: 0


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

Junior Member

10+ Year Member

joined:Aug 18, 2002
posts:56
votes: 0


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

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

Junior Member

10+ Year Member

joined:Jan 5, 2003
posts:63
votes: 0


Thanks weesnich, it looks a lot better now :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members