Set the default index page for a website

更新时间:
复制 MD 格式

Cloud Web Hosting provides a default index page for testing purposes. After you upload your website program, you must set your official homepage as the default index page to ensure that your website runs correctly. This topic describes how to set the default index page for your website.

Procedure

Important

Before you start, make sure that you have a File Transfer Protocol (FTP) client installed. We recommend using FileZilla. Click FileZilla to download the tool.

  1. Use FileZilla to connect to your Cloud Web Hosting instance.

    For more information, see Manage website program files using FileZilla.

  2. Log on to the Cloud Web Hosting management page.
  3. Find the Cloud Web Hosting instance that you want to manage and click Manage in the Actions column.
  4. In the navigation pane on the left, choose Basic Environment Settings > Default Homepage Settings.

  5. In the Homepage Priority Settings area, check whether the list contains the name of your website's homepage file.

    Note

    Cloud Web Hosting provides a list of common homepage file names. If you do not know your website's homepage file name, check if any of these files exist in your website root directory (Linux: /htdocs, Windows: /). You can also ask your website developer for the homepage file name.

    • The website homepage file name is not in the list

      Set the homepage file as the default index file for your Cloud Web Hosting instance as follows:

      1. In the Please enter the homepage file name field, enter the name of your website's homepage file, such as welcome.html, and click Add.linux设置首页

      2. Click Save Settings.

        After you set the homepage file name, wait about 5 minutes for the new default index page (welcome.html) to take effect.

    • The website homepage file name is in the list

      For example, if your website homepage file is named index.php and is already in the list, move it to the top of the list to give it the highest priority. Perform the following steps:

      Important

      You can also delete the pre-configured default index page homepage.html (path: /htdocs/homepage.html). If you are unsure whether homepage.html is the pre-configured default index page, check the file content. If it contains the text This is a test access page provided by Alibaba Cloud, delete the file.

      1. In the Homepage Priority Settings area, select your website's homepage file (index.php) from the list. Click the 图标 icon to move the file to the top of the list to set it as the highest priority.

        首页调整

      2. Click Save Settings.

        After you change the default index page, wait about 5 minutes for the new default index page (index.php) to take effect.

References

The default index page set in the host management console may not take effect because of incorrect priority settings or errors in the website's configuration file. For more information, see The default index page does not take effect.