IIS6 - Bad Request Hostname Invalid [Answered]RSS

2 replies

Last post Feb 20, 2019 04:45 PM by carlh2019

  • IIS6 - Bad Request Hostname Invalid

    Feb 20, 2019 12:27 PM|carlh2019|LINK

    Hi,

    I am in the process of moving a web app over onto Windows Server2012, but before i can do that, a previous programmer put a website in a folder under our website and kept using our main website name/the folder name to load up this other web application, which means we cant just swap servers due to us not knowing if he's done any hardcoding on foldernames etc.. so we're leaving his code where it is for now until we get some time to go through it and see what he's done.

    So - I've got a new domain name just for his code, its pinging to the server so  I know that is all fine (server is win2003) but before I can move the main website, I need to make sure his website will run on its own using that domain name we purchased.

    Once his website runs via the new domain, I can switch off the current main website and enable the WS2012 version, job done.

    I know IIS can handle multiple websites, under the same port - but for some reason, this new website, set up as a duplicate of our original, (aside from host headings, which are with and without the www prefix to the domain address) just keep giving us Bad Request (Invalid Hostname).

    Both sites work from port 80 - the main website still runs fine - just the additional one seems to be giving us the Bad Request error.

    Im pretty stuck on what to do as I know the hostname is correct, someone please help! :)

  • Re: IIS6 - Bad Request Hostname Invalid

    Feb 20, 2019 03:56 PM|lextm|LINK

    carlh2019

    I know IIS can handle multiple websites, under the same port

    IIS can only handle that if you do configure the site bindings correctly, https://docs.jexusmanager.com/tutorials/binding-diagnostics.html#background If that's too dry to understand, you might run a diagnostic report and see what it says.

    Lex Li
    Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: IIS6 - Bad Request Hostname Invalid

    Feb 20, 2019 04:45 PM|carlh2019|LINK

    Hi and thank for the reply :)

    I found it. Goddam wrong IP - was pointing to a sub domain of the main host website, but on a different server, one number wrong in the IP address. SUPER DOH!

    Thanks!!!