Forum Moderators: goodroi

Message Too Old, No Replies

robots.txt? OR .htaccess?

disallowing or protecting directories

         

johnjoyce

7:58 am on Nov 12, 2006 (gmt 0)

10+ Year Member



If you want to protect a directory or its contents, you need to look to the forum titled
.htaccess
It is a simple type of file read by your own web server.
robots.txt can be considered more of an honor-system based suggestion to bots of what to do or not do.
.htaccess is literally access control!
generally, it is best to have a blank robots.txt file if you don't want to have server logs that talk about robots.txt all the time.
if you do want those logs and want to be searched and indexed (usually yes), have no robots.txt file.
if you want to just protect particular areas of your site, use .htaccess
it is a set it and forget thing.

goodroi

4:27 pm on Nov 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Welcome JohnJoyce,

it is always a good reminder that robots.txt is followed by the mojor engines, rouge bots can ignore it and for situations like those it is better to use htaccess.

i can't agree with you on a blank robots.txt. i think it matters on the individual situation.

cheers