Resolve a 403 Forbidden error

更新时间:
复制 MD 格式

After you build a website using web hosting or a Simple Application Server, you may receive a Forbidden or HTTP Error 403.14 - Forbidden error when you access the website. This topic describes possible causes and solutions for this error.

Symptoms

After your website is deployed, it may return a Forbidden or HTTP Error 403.14 - Forbidden error message. The specific error message varies based on the operating system:

  • For a website on Linux web hosting, the page displays a Forbidden error message: You don't have permission to access / on this server.

  • For a website on Windows web hosting, the page displays an HTTP Error 403.14 - Forbidden message with the following text: The web server is not configured to list the contents of this directory. This error typically occurs because a default document is not configured for the requested URL and directory browsing is not enabled on the server.

Causes

  • A default homepage file, such as index.php, is missing from the website root directory. For security reasons, web hosting does not allow directory browsing. As a result, a 403 error is returned if a default homepage file is missing.

  • A 403 error also occurs if access restrictions are configured for your website.

Solution

  1. Check whether a default homepage file is present in the website root directory.

    • If a file is present: Proceed to the next step.

    • If a file is missing: Upload a default homepage file to the website root directory and set it as the default page for your website.

      1. Use an FTP client to upload the default homepage file to the appropriate website root directory for your operating system.

        • For Linux web hosting, upload the file to the /htdocs directory.

        • For Windows web hosting, upload the file to the root directory (/).

      2. On the web hosting management page, set the default homepage for your website.

        For more information, see Set a default home page.

  2. Check whether access restrictions are configured in your website application.

    • If restrictions are configured: Follow these steps to remove them.

      Important

      The following steps are for Linux web hosting. You cannot view configured permissions on Windows web hosting. To remove access restrictions on a Windows host, contact your website developer.

      1. Log on to the web hosting management page.

      2. Find your web hosting instance and click Manage in the Actions column.

      3. In the left-side navigation pane, choose File Management > File Manager.

      4. On the File Manager page, click View Set Permissions.

      5. On the View Set Permissions page, find the permission to remove, click Delete in the Actions column, and then click OK.

        Note

        The permission changes take about 10 minutes to take effect.

      6. Click OK.

    • If no restrictions are configured: Proceed to the next step.

  3. Access your website again to verify that it loads correctly.

    • If the website loads correctly, the issue is resolved.

    • If the issue persists, submit a ticket for technical support.