Aller au contenu

"Index of /" shows instead of my website

Ce contenu n’est pas encore disponible dans votre langue.

If your domain shows a page called Index of / with a list of files and folders, the server can’t find a home page in that folder, so it lists what’s there instead.

The server looks for these files, in this order: index.php, index.html, index.htm.

In cPanel’s File Manager, open your website’s folder (public_html for your main domain) and check:

If your home page must keep another name, such as home.html, tell the server to use it. Add this line to .htaccess in that folder:

DirectoryIndex home.html index.php index.html

See Changing the default directory index.

File lists let anyone see and download files in folders without a home page, such as backups or uploads. To turn them off:

  • In cPanel, open Indexes under Advanced, choose the folder, and select No Indexing. See Using the Index Manager in cPanel.
  • Or add Options -Indexes to the .htaccess file in public_html.

Visitors then see a 403 Forbidden page instead of a list of files.

Cette page vous a-t-elle aidé ?