How to setup Default web page in cPanel?

The below steps will assist you in setting the default home page on your site. 

Step1: Login to Cpanel Panel.

Step2: Open File Manager in Cpanel.

Step3: Click on Settings at the top right corner. Select the Document Root and ensure that Show Hidden files(dotfiles) are selected. Next, click on the Save button.

Get best Shared Hosting

Step4: Open the ".htaccess" file and click on "Edit."

Step5: Insert the following line of code into your .htaccess file to set your desired index page. Here, we have set home.php as an example.

# Custom default index page

DirectoryIndex home.php

You can also specify multiple files. The server will attempt to locate them in the order they are listed, moving from left to right.

# Custom default index pages

DirectoryIndex home.php hello.htm welcome.html

You can set any page as the default page for your website.

Step6: Click on Save Changes. We have successfully set home.php as the default page.

Now, whenever you access your website, it will load the home.php as the default page.

Get best Shared Hosting

Was this answer helpful?

« Back


/* */