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)"
HTTP ProtocolDNSSSL / HTTPS

Avatar of undefined
Last Comment
Chris Dent
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.
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

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
melli111
Flag of United States of America image

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.
Avatar of melli111
melli111
Flag of United States of America image

ASKER

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.
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of melli111
melli111
Flag of United States of America image

ASKER

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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
DNS
DNS

The Domain Name System (DNS) is a hierarchical, globally distributed system responsible for associating the name of a computer, service or other resource into an IP address for connecting to the Internet or a private network. Most prominently, it translates domain names to the numerical IP addresses needed for the purpose of computer services and devices worldwide.

29K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo