Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

Why and How to Prevent Directory Browsing in WordPress

Last modified on March 9, 2019 12 sec read

What is Direcoty Browsing

In our website, if there is no index file likes index.php, index.html etc. in the homepage or folder, then our web page shows the all files like the file manager. So, if a visitor visits the folder then the visitor can show all files and folders. The visitor will get all internal files.

Disable

Hackers take this facility. The hackers try to find out if you have any files with known vulnerabilities. So, you need to disable this directory browsing.

How to Disable Direcoty Browsing

Easily we can disable this. We are going to disable this via .htaccess file. Okay just follow this steps.

First, login to your CPanel. Open file manager. Or, you can use FTP client. You can use FileZilla – The free FTP solution.

Once you connected with FTP, go to the root of your website’s directory. If there is a .htaccess file, edit the file. Or if there is no .htaccess file, just create a file named .htaccess. Then edit the file.

Now at the end of your .htaccess file, add this line.

Options -Indexes

Don’t forget to save the .htaccess file before closing. That’s it. I hope this article will help you.

Read all security tips and tricks about WordPress: The Powerful WordPress Security Guideline – Simple Tricks

You're welcome to suggest any article to write!

Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

Leave a Reply

Your email address will not be published. Required fields are marked *