Hi all, I work for an internet company and we have an internal network running. We recently had problems with our router and had to get a replacement (identical model) which now works, however since we replaced the router it is not possible to view local websites over the network. For instance before the router was replaced we could type in in the browser and this would allow us to view the site over the network whilst it was being worked on, but now it comes up "Bad Request (Invalid Hostname)" all of the time. The guy that set all of this up has now left the company and is no longer an option to ask.

The server is running Windows 2003 Server.

When we first got the replacement router, the default IP was , however it was previously , which I have since changed, but that still did nothing.

The server is set to obtain an IP automatically, as are all of the other pc's on the network.

I have setup a few screenshots to show how our system is setup. I've included DHCP, DNS, Modem setup and IPCONFIG shots.

http://www.arrivalpreview.co.uk/screen/screenshots.html

I was advised that the router was running DHCP as well as the server, so I turned off DHCP on the router and this stopped the internet working altogether, however it did enable me to view a site using . I've changed this back since as I couldn't do without internet access.

These server settings have not been touched since the router was replaced, so I'm almost certain it is a problem in the setup of the new router. The router is a Speedtouch 510.

Hope someone can help, it's driving me insane!

Thanks in advance.

Chris

Dani AI

Generated

Short diagnosis: the "Bad Request (Invalid Hostname)" message is an IIS-level response meaning the HTTP Host header does not match any site binding on the server. That outcome is most often caused by either name resolution returning the wrong IP (DNS/DHCP/router interaction) or the web site being bound to a different host/IP. 's suggestion to check DNS is exactly the right place to start.

Essential checks (in this order):

  • Verify what the workstation resolves for the short name with DNS:
    nslookup nameofsite
    nslookup nameofsite <internal-DNS-IP>

    If the name resolves to the router or a public IP instead of the web server, DNS is the culprit. If it resolves to the web server IP but the browser still shows the IIS error, the host-header binding is the likely issue.

Confirm IIS bindings: open IIS Manager, right-click the site -> Properties -> Web Site tab -> Advanced. Confirm the IP/port and any Host Header names. Either add the short name as a host header for that site or bind the site to the server IP (or "All Unassigned") so requests for that hostname are accepted.

DHCP/DNS/router guidance: make sure DHCP is handing clients the internal DNS server(s) (not the router as a DNS proxy) so local names resolve internally. Prefer a static IP or DHCP reservation for the web server and keep the DNS A record updated to that address. If the router is acting as a DNS proxy, disable DNS proxying or configure it to forward local queries correctly.

Quick temporary workaround: add a hosts entry on a workstation to map the short name to the server IP:

192.168.x.y  nameofsite

If name-to-IP checks, IIS bindings and the hosts test are done and the problem remains, collect the nslookup output and the IIS site binding list for a focused next step.

Recommended Answers

All 5 Replies

Check your DNS server.

Sounds like your router does not have proper DNS information.

IE it has outside DNS address when it should have the internal DNS servers address.

Forgive me for sounding dumb, but how would I go about finding this out?

Goto My network Places

Then properties and choose your Ethernet Adapter then goto TCPIP settings and properties.

It should be set static and have:

IP
Subnet
Gateway

Primary DNS
Secondary DNS


Do you know which server is acting as DNS?

Also

START | RUN | CMD {enter}

Then type ipconfig /all

This will bring it up in ados window.

Paste me your info once you have done so.

The IP is set to "Obtain an IP address automatically" and the DNS is set to "Optain DNS server address automatically". These are settings that have always been set this way, none of this has ever changed.

In my first post, I listed a site I had setup with various screenshots, I attached a screenshot of the dos command with ipconfig /all, hope this helps.

Many Thanks

Well looks like to me that you have your router set as your DNS and it should not be set that way being that your DNS server is at 0.212

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.