"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.
Fix it
Section titled “Fix it”1. Check you have a home page file
Section titled “1. Check you have a home page file”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:
- The file is there. If you haven’t uploaded your website yet, the folder may be empty. See Publishing your website with FTP.
- The name is right. It must be lowercase
index.html, notIndex.htmlorhome.html. Rename it if needed. - It’s not in a subfolder. If the list shows a single folder, such as
mysite/orwordpress/, your files are one level too deep. See Moving a website from a subfolder to the main domain.
2. Your home page has a different name
Section titled “2. Your home page has a different name”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.htmlSee Changing the default directory index.
Hide file lists for security
Section titled “Hide file lists for security”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 -Indexesto the.htaccessfile inpublic_html.
Visitors then see a 403 Forbidden page instead of a list of files.
Cette page vous a-t-elle aidé ?
Merci pour votre retour.