How to Disable directory listing of your Website


How to Disable directory listing of your Website

Disable directory listing

This is My First Topic related web security in this topic we are going to see about Disable directory listing of your Website.directory listing (File manager) is very important backend to our website yes it show our website backend file’s that we used for build our website also it help’s the Stranger’s to see your website file’s and important backend mechanism that we used to create our web apps, etc……

Most of web Developer’s Forgot to  Disable directory listing some guys easily clone our website check the below image

Disable directory listing

Follow these Steps to Disable directory listing of your website

  • Your website Should be hosted on Apache server
  • Log on to your website Cpanel
  • Open the File manager while opening the file manager check the show hidden file’s option it help’s you to view your htaccess file in the File Manager(check the Below Image).if  your website is not having the htaccess file create a New file with this extension .htaccess

Disable directory listing

  • Now paste the below htaccess code on your website htaccess file.
Options -Indexes
  • For WordPress paste the code to your WordPress site htaccess file or open the Yoast SEO goto > tools > Click the File editor now its open our WordPress htaccess File Paste Above code in that file and click the save settings successfully you added the Disable directory listing code on your WordPress htaccess file.
  • After that when some trying to open your File directory but it show’s the Forbidden Error page like this check the below image.

Disable directory listing

  • you can also add your own error page just add this below code in your htaccess file.
ErrorDocument 403 /403.shtml
  • Now create a New 403 file 403.shtml and add your custom Message or add your custom designed 403 error page template.

Also Check Articles Related to htaccess

If you have any Question’s in this topic please Feel free to comment here I will help you.


Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com



4 Shares
+11
Tweet
Share2
Pin1
Stumble