How to disable Directory Browsing in WordPress

If you type "http://www.yoursite.com/wp-includes/" in your Internet Browser, you will see the list of directories and its files as shown in the following figure:

WordPerss Directory Browsing

In this case, you can disable Directory Browsing to protect your content from hackers who might be able to misuse it.

To disable the Directory Browsing feature, please add the following line at the bottom of the .htaccess file.

# Disable Directory Browsing

Options All -Indexes

Now you will not see the content of the directories when you try to access them. When you try to access the /wp-includes/ folder, 404 Page Not Found error page appears, or the following message will appear:

Access Denied

Or

Forbidden



You don't have permission to access /wp-content/uploads/ on this server.

For your reference, disabling the Directory Browsing feature will not affect SEO of your site.

댓글 남기기

프리미엄 테마 그래픽 동영상 템플릿 무료 다운로드