on air

Disable Directory Browsing.

back home » Scripting Tutorials » .htaccess » Disable Directory Browsing.


How To Check If Directory Browsing Is Disabled Or Enabled.

Usually some hosting providers like Godaddy.com. will take care of this for security reasons, and some will leave it as optional. However, it's your duty to check and secure your site if directory browsing is enabled. Follow steps below to check and secure your site now.

  • First of all, you'll open your web browser.
  • Enter your domain name and a path to a folder inside your root directory and hit enter;
    • www.ghanachild.com/video
  • If your browser display any content from your site [Files or Folders]. Then you should be aware, everyone can also see what you are seeing by requesting the same way, which means, directory browsing is enabled. [Pray no hacker will find this] .
  • However, if you see a 403 Error page -Forbidden screen like the one below, then your site's directory browsing is disabled.
  • Good luck, because this user's act sounds suspicious to the server.

See the 403 error image below.

403 Forbidden

If directory browsing enabled, no fret, Just follow steps below to disable it.

Disable Directory Browsing Using .htaccess.

For this tutorial, I assumed that you know how to go around with .htaccess file, if not then, go and learn how to do this from our .htaccess tutorial.

Now open your .htaccess file, search for Options Indexes. And simply add a minus sign in front of Indexes like this: Options -Indexes

If you did not find it in there, just skip to a new line, add Options -Indexes save the .htaccess file, and upload it back to your server again.

Restart or refresh your server, and the effect will take place. The directory browsing will be disabled. Now try to access the directory again as we did above.

See illustration below.

Options -Indexes

Disable Directory Browsing Using httpd.conf.

Open your httpd.conf file, Usual location is /usr/local/apache/conf or /etc/httpd.conf.

In your own Virtual Host Settings you'll find Options Indexes. And simply add a minus sign in front of Indexes like this: Options -Indexes

If you did not find it in there, just skip to add a new line, add Options -Indexes save the .htaccess file, and upload it back to your server again.

Restart or refresh your server, and the effect will take place. The directory browsing will be disabled. Now try to access the directory again as we did above.

There are other methods, used to disable directory browsing, you may ask your hosting provider for their alternatives. Check also the video tutorial below.

Disabling Dirctory Browsing.

Clicks4UrMind

Man will give you worldly powers, and make you feel on top of all, note this is temporally and could be redrawn at anytime sending you back to the ground floor of life. However, the Lord Almighty, the one and the only rightful ruler of the Universe, blesses everlastingly.

Brain

Knowledge is Power, but Power is not Knowledge. Wisdom is the truthful Power that identifies the Knowledge within the man. And only, I repeat 3x. Only the almighty God has the power to bless the man with his Wisdom forever.

To achieve the Lord's blessings, cease not praying daily, asking for his Wisdom, and you'll be blessed abundantly...

SPYERA PHONE

Spyera Phone

Spyera Phone version is software that you install on a smart phone to monitor everything happening on the phone. After installation, SPYERA secretly records events (sms, call history, phone book, location, emails, What's App messages, IM, Facebook Chat, Skype, See photos taken and many more...) that happen on the phone and delivers these information to a web account, where you can view these reports 24/7 from any Internet enabled computer or mobile phone. SPYERA also allows you to listen to the surroundings of the target mobile , listen to the phone conversation and to know the location of the device.

 

Please, Kindly Donate What You Can, Enabling Us Pay Hosting And Domain Costing, And Do More.

Please Donate