Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default, I have directory indexing turned off via apache, to limit oracle attacks to find php scripts. Should I turn directory indexing on for /images/ folders, to make all the images on the site discoverable to search engines, or not?

Is there a disadvantage to a search engine spider getting a 403 Forbidden when they access the root folder /images/ directly as opposed to say /images/someimage.jpg ?

share|improve this question
up vote 4 down vote accepted

You could do that if you want those images to be indexed and found in image search. But they'll be ranked better if the search engines find them in web pages because they can use nearby text, alt attributes, page context, etc, to determine what the image is. They can't do that from a directory listing unless you've done an incredible job of naming your subdirectories and images. Then again, that will also be available in your HTML so there's no advantage there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.