IIS 7 and Above
Website name resolves into FQDN for the server
Last post Oct 31, 2018 03:45 PM by Tevfik Saatcioglu
Oct 31, 2018 12:31 PM|Tevfik Saatcioglu|LINK
I am trying to host our company webpage on one of our servers. I am currently using a temporary domain, and it points to one of our external IP addresses. On our firewall the external IP address point to the internal IP address of the server. And the website
works internally, when I type in FQDN of the web server from any domain computer I can access the website fine. However if I try to use the temporary domain name to access the website externally from an external computer, the domain name I type in changes
to the FQDN of the server in the browser address bar, and since the computer is not in the domain it can find the web server.
Oct 31, 2018 12:57 PM|lextm|LINK
I am currently using a temporary domain
If you haven't made that domain available via a public DNS server, no external machine can resolve the domain name to the proper IP address. Either you modify hosts file on that machine to simulate, or you correctly publish the domain externally.
Oct 31, 2018 01:13 PM|Tevfik Saatcioglu|LINK
No, with 'temporary domain' I meant it was different then our main company website domain. Since I can't disable the old website until the new one is finished. The 'temporary domain' is fully registered and published, it resolves with our IP on dns lookup.
I apologize for the confusion.
Oct 31, 2018 02:25 PM|lextm|LINK
So the requests would use the temp domain as Host header and arrive at IIS. There your website must have proper site bindings so as to receive such requests from http.sys. Otherwise, IIS won't know who should handle them.
What are the current site bindings the web site is using?
Oct 31, 2018 02:52 PM|Tevfik Saatcioglu|LINK
Current bindings are:
Type Host Port IP Address
http 80 127.0.0.1
http 80 *
I tried the following binding but when i add it the website stops working all together, so when I type in FQDN for the server in internal computers I get 404 error.
http domain.com 80 *
Before you ask I also tried binding the external IP address but that didn't work either.
Oct 31, 2018 03:11 PM|lextm|LINK
http 80 *
So back to "the domain name I type in changes to the FQDN of the server in the browser address bar". Now it seems to be irrelevant of your network/IIS settings, and is more likely to be an application level issue.
Can you check your application source code to see if it issues redirection to FQDN? It should not use FQDN of the machine to construct redirection target URLs, but to use the Host header from the requests.
Oct 31, 2018 03:45 PM|Tevfik Saatcioglu|LINK
It is always the simplest thing, It is a WordPress site, and when I checked the settings, i realized it was still using the server name as the URL. My web designer forgot to change it. Thank you for the lead and all your help.