Help Center/ Elastic Cloud Server/ Troubleshooting/ IIS Installation Issues/ What Can I Do If the Error Message "Bad Request - Invalid Hostname" Is Displayed When I Use a Windows ECS to Access an IIS Website?
Updated on 2025-07-30 GMT+08:00

What Can I Do If the Error Message "Bad Request - Invalid Hostname" Is Displayed When I Use a Windows ECS to Access an IIS Website?

Symptom

When I use a Windows ECS to access an Internet Information Services (IIS) website, an error message "Bad Request - Invalid Hostname" is displayed, as shown in Figure 1.

Figure 1 Error message

Possible Causes

In the IIS Manager, if the number of configured websites is greater than or equal to 100, no sites will be activated and the error message "Bad Request - Invalid Hostname" will be displayed when IIS is started.

Solution

  1. Log in to the Windows ECS.
  2. Choose Start > Windows Administrative Tools > Internet Information Services (IIS) Manager.
  3. On the displayed page, select the target server and double-click Configuration Editor.
    Figure 2 Internet Information Services (IIS) Manager
  4. Select the system.applicationHost/webLimits section.
    Figure 3 Configuration Editor
  5. Set dynamicRegistrationThreshold to 100.
    Figure 4 Setting the threshold
  6. Access the website again.