Wesley Kluckhohn
Wesley Kluckhohn

Reputation: 115

Why should I hide my website index?

I've tried looking it up and am now coming back to here to see if I can get my question answered. Why should I make it so that others cannot view my indexes? Is there a security reason for this?

I'm just beginning in web development....so I definitely could use any help/info that you all can provide.

Upvotes: 0

Views: 262

Answers (1)

Brad
Brad

Reputation: 163438

It's often considered a security best practice to hide directory listings. You may accidentally upload files to your docroot that you don't want to share to the world. Without knowing the URL, nobody would be able to access them. While this is a very thin layer of security, it can be helpful.

There are certainly times when you may want a directory listing, such as download directories. It's up to you to decide what is useful to you. If you don't need it, don't use it. If you do, use it.

Upvotes: 4

Related Questions