When someone visits a folder of your website, for example yourdomain.com/, the server shows that folder's index page. On our cPanel hosting, files named index.php, index.html and index.htm are treated as index pages.

Use a different file as the index page

  1. Log in to cPanel at https://cloud.lurstanhost.net:2083 and open Files > File Manager.
  2. Select Settings at the top right, tick Show Hidden Files (dotfiles) and select Save.
  3. Open the folder, usually public_html.
  4. Right-click the file .htaccess and choose Edit. If there is no such file, create it with + File.
  5. Add this line, using your own file name: DirectoryIndex home.html
  6. Select Save Changes.

You can list several files in order of preference, for example DirectoryIndex home.html index.php. The server uses the first one it finds.

The setting applies to the folder and the folders inside it. If your site runs WordPress, leave the existing WordPress lines in .htaccess as they are and add yours above them.

Was this answer helpful? 0 Users Found This Useful (0 Votes)