Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 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

 
discard

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.