Why and How to Prevent Directory Browsing in WordPress
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.
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.
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
Preview may take a few seconds to load.
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Bold **double asterisks**
Three back ticks and then enter your code blocks here.
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
> type a greater than sign and start typing your quote.
You can add links by adding text inside of  and the link inside of (), like so:
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of , and the image URL inside of (), like so:
To add a divider you can add three dashes or three asterisks:
--- or ***