Welcome to WebmasterWorld Guest from

Forum Moderators: goodroi

Message Too Old, No Replies

Does robots.txt prevent all access?

...on page as well as directory.

12:04 pm on Sep 30, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2004
votes: 0

Sorry if this has been asked 100 times before, but can't find the exact answer through search.

If I block a directory in robots.txt eg. /carimages/ I know that the bots will not then visit that directory.

May seem a stupid question but does it also mean that the bots also won't retrieve any image from that directory, even if a page that allows bots retrieves an image from the directory eg. page code has...img src=carimages/car1.jpg?

(I don't want them to get the images on some of the pages, but do want the pages indexed).

Thanks in anticipation.

5:02 am on Oct 3, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0

robots.txt disallows using prefix-matching. Anything (directory, file, script, etc.) whose prefix matches the given pattern will be disallowed. Therefore, yes, all images in your /images/ directory will be disallowed, and will not be fetched by robots.txt-compliant robots.