How to set index page from cPanel via .htaccess?

You can set the custom index page to your website by modifying the .htaccess file. This article will guide you to set the custom index page from cPanel.

  1. Login to cPanel.
  2. Under Files section, locate and click on File Manager option.

    File Manager

  3. Navigate to your website folder (public_html or sub directory) and search for the .htaccess file. If .htaccess file is not there in your directory then create it manually.
  4. Right click on .htaccess file and select the Code Edit option to open this file in editor.

    Edit .htaccess

  5. Add following line at top of this file and save the .htaccess file.

    DirectoryIndex FileName.html  // Replace FileName.html with your actual index file name.

    For example, if you want to set default.php file as the default page of your website then add the below line in the .htaccess file.

    DirectoryIndex default.php
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to add a record with the DNS Zone Editor in cPanel?

  How to add a record with the DNS Zone Editor in cPanelThis demo assumes you've already logged...

How to add an MX entry in cPanel?

  How to add an MX entry in cPanelThis demo assumes you've already logged in to cPanel, and are...

How to backup your website in cPanel?

  How to backup your website in cPanelThis demo assumes you've already logged in to cPanel, and...

How to Change PHP Directives Globally from WHM with EasyApache 4?

You can follow below steps to change the values of PHP directives for all the websites running a...

How to change PHP version from cPanel?

The latest version of cPanel/WHM (58.3.x) is shipped with the EasyApache 4.0. It allows you to...