Directory index files on cPanel Hosting
Follow the instructions below to modify the default index page on cPanel Hosting accounts. Please note that modifying the directory index file on a cPanel Hosting account requires users to modify their .htaccess file. If modified incorrectly, you could break your live website. It is recommended you backup your .htaccess file before attempting to make any changes to it.- Log into your Account.
- Find the cPanel in question and log in.
- Click the File Manager icon.
- Select Home Directory.
- Tick the box next to Show Hidden Files (dotfiles).
- Click [Go].
- Navigate to the public_html directory.
- If a .htaccess file exists, select it then click the Edit icon
- If no .htaccess file exists, click on the New File icon and create a file called .htaccess
- Type in the below code into your .htaccess file:
- If you want to add additional default index file options, you can add a space and include additional file names eg. DirectoryIndex index.php index.htm index.html Index.html
- Once done making the appropriate changes, click [Save Changes].