تحميل

How do I disable directory listing in cPanel?

Updated at
26/01/2023
Views
7315

To disable directory listing in cPanel, you can use the .htaccess file. Here are the steps to follow:

  1. Log in to your cPanel account.
  2. In the Files section, click on the "File Manager" icon.
  3. Locate the .htaccess file in the public_html directory. If you do not see the file, make sure that "Show Hidden Files" is enabled in the settings.
  4. Right-click on the .htaccess file and select "Code Edit" or "Edit".
  5. Add the following line to the file: Options -Indexes
  6. Save the changes and close the editor.

This will disable directory listing for the entire website. If you want to disable directory listing for a specific directory, you can create a new .htaccess file in that directory and add the same line.

Alternatively, you can also disable directory listing by adding the following line to the Apache config file,

<Directory /path/to/directory> Options -Indexes </Directory>

Please note that disabling directory listing can help to improve the security of your website by preventing people from easily browsing the contents of your directories. However, it may also prevent some legitimate uses of your website, so it's important to test your website after making this change.

YottaSrc footer

لماذا تختارنا؟

أفضل الأسعار, تخزين SSD سريع و دعم فني
24/7 حقيقي

control panel icon
cPanel

إدارة موقعك من خلال CPanel بأحدث إصدار

security icon
سريع وموثوق وآمن

ضمان وقت تشغيل بنسبة 99.8٪.
لذا ركز على عملك!

support icon
دعم 24/7/365

ليلاً أو نهارًا ، مطر أو شمس ،
فريقنا هنا من أجلك!

cloud backup icon
نسخ احتياطي يومي

نسخ احتياطي يومي وأسبوعي.
ملفاتك آمنة!