How can I turn off directory indexing?

I would like to have my wp-content/uploads directory not be publicly accessible…but I don’t know how to do that. Can someone help me?

Thank you

.htaccess can do this for you :slight_smile:

Put this at the very top:

Options -Indexes

I know this is very basic…but I don’t know where to find the .htaccess file. Is that something I would see in my ftp, or in the dreamhost control panel?

Thank you for your help

create a file with that one line in it, and upload it to your uploads folder with the name .htaccess

thank you very much!

WordPress makes a .htaccess for you if you have pretty permalinks so you can add it to the top of that one.

Shouldn’t wp-content/uploads have a blank (or other) index file in it by default?

Nope. Probably in part because WP leaves your wp-content folder alone when upgrading :slight_smile: