Generally, when we see a Bad Request (Invalid Hostname) error on the website, we will say that it is iis. If there is a problem with apache, the solution to this problem in iis is probably: IIS> default website> Properties> website> IP Address: (all unallocated)> advanced, there is a host header value, or you can directly restart iis to solve the problem.
The website access error "Bad Request (Invalid Hostname)" appears, as shown in:
Analysis:
"Bad Request (Invalid Hostname)" is literally "Incorrect Request (Invalid host name)", which is an error message of iis6. That is to say, the domain name has been resolved, but the host corresponding to the domain name cannot be found.
Therefore, we can confirm that this problem is related to the domain name binding.
The following situations and solutions are prompted:
If you are using an independent system server or VPSIn general, the correct method can solve the problem after the domain name is bound in IIS. If the problem persists after the domain name is bound, the server may have multiple IP addresses and the IP address corresponding to the domain name is incorrectly bound, if you cannot confirm, you can bind the domain name to "all unallocated"
Specific steps: IIS> default website> Properties> website> IP Address: (all unallocated)> advanced, which contains a host header value to check whether this domain name is bound. Check whether the IIS Site is correctly enabled.
If you are using a VM, Please log on to the control panel of your space and check the host status to see if the site is running. This error will occur if the site is stopped because there is no record filing or resource access is exceeded, this includes whether the domain name is included in the binding settings of the domain name.