Link to home
Start Free TrialLog in
Avatar of melli111
melli111Flag for United States of America

asked on

Bad Request (Invalid Hostname)

I just created a new website on our company's server through IIS.  I created it with all of the same settings as an existing website that I know works on our server, with the only difference being that the site that works has an unassigned IP address, and the new site has an IP address, and the TCP port is different as well.  All other settings are the same.  When I try to access a page on the new site, I get the error message

 "Bad Request (Invalid Hostname)"
Avatar of Carl Dula
Carl Dula
Flag of United States of America image

To see if the web server is working try:

       http://ipaddress:port

If you get a response, then the issue is with dns not resolving the url you are using.

If you don't get a response, then chances are the web server is not running on that ip address.
If you get 400, Bad Request then no sites configured on the system can answer your request. This typically happens when you have a server configured to use Host Headers. That is, the server will answer "http://www.domain.com", but will not like "http://1.2.3.4", or will not like any name you haven't explicitly configured.

You know you don't need to use a different port, right?

Chris
Avatar of melli111

ASKER

We have several different websites set up in IIS.  I did make sure that this website that I am setting up has a different IP than the others.
The website configured here does not have any host headers.  All of the other websites set up in IIS do not have an IP address specified, while this website I am setting up needs to have an IP address specified as I am attempting to have the location of this website be able to be viewed outisde of the local intranet.
Which IP did you give it when you configured it?

To get 400 you're getting to the web server, but it's not finding an appropriate set to answer about, hence bad request.

Chris
I did someone's suggestion of doing the :portnumber after the IP address, and sure enough, this worked.  This means that the DNS is not configured correctly for the website?
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial