how to set an ip address as the host header in IIS 7.5 bindings - iis-7.5

I am having an issue getting an IIS 7.5 website to answer when I connect to it using an IP address.
I have a Win2008 Server set up with IIS 7.5. It has only one IP address bound to it (10.10.10.10), and IIS listens on it just fine. I have IIS hosting two websites: defaultsite and mysite. Both of these two are necessary to be present. (To be fair, I have many more sites, but 2 will simplify things.)
Defaultsite is your typical IIS default site and has an IIS binding of "*:80:"
I want to access "mysite" via the DNS name but also the public IP address 1.1.1.1. So I've added the appropriate bindings:
":80:1.1.1.1"
":80:mysite.com"
My DNS and load balancer are moving traffic just fine to the IIS server. Everything works fine when hitting the server via "mysite.com" and I get the defaultsite if I try other ways to get to the server.
The problem is when I use 1.1.1.1 to get to the server, I get there, but I'm still sent over to the "defaultsite" rather than "mysite." My IIS logs and the file contents I retrieve verify this behavior.
Any ideas on how to get an IP address set as the host header on a site binding? (Searching for this situation is vexing; since all my key terms are present any time you work with host headers/bindings.)

Remove the binding for *.80 from the default site and make it respond to 10.10.10.10 and then your other site will get picked up when you type the 1.1.1.1 site. IIS is responding to the request but the rule states 'If any site comes through on port 80, respond to the default site'. The DNS name works because you are going by name and the lookup is not there on the default site.

Related

Windows 10 IIS 10 Error 404 Resource Not Found

I have two websites on a Windows 10 Pro box using IIs 10. Both websites have their bindings set for HTTP, a hostname, any IP address and both using Port 80. IT has added a DNS entry that resolves the website hostname set in bindings. From inside IIS I can browse either web site. On the machine that is hosting the web sites I can open them just using the web site host name. However, on another machine on the network you put in the FQDN of the web site and you immediately get a Error 404 Resource Not Found. When you do a nslookup on the FGDN is resolves correctly.
I am stumped. Anyone who might have an answer?
Thanks,
Doug
The solution was to create a new site in IIS! This time I made sure that the hostname was all lower case and matched the host name in DNS. I am suspecting that everything is case sensitive.
Doug

Why can't I use a port with my website domain name?

I have a registered domain name, www.aaaDomain.com, assigned to ip address xx.xx.xx.xx . I set up my site on IIS8 to use the ip address xx.xx.xx.xx and port 8020 for my website. I can connect to the website when I type xx.xx.xx.xx:8020 in a browser but I cannot connect to the website when I use www.aaaDomain.com:8020
Also, I have another website on this same server as my Default website. When I type just the domain name without the port number, my default website comes up (because DNS does not allow adding port numbers) just like when I type in the ip address without the port number.
What am I doing wrong?
Here is what my site binding looks like on IIS8.
As you already have an existing site running on the server you should check your security settings on both the Windows firewall and any other security/firewall settings you have - It sounds like you have not opened the additional port which you have just configured in IIS.
Check to see if you can ping the new site by its domain name - that will verify that you have the correct DNS setup, you can also try & browse to it via the server console (or remote desktop) if that works then its security setting somewhere blocking your access. Even if the ping request times out it should still resolve the name to an IP address for you to check. You may find that ICMP is also blocked.
If you just changed your dns record, be aware that you should wait up to 72 hours for the dns to replicate after changing your dns record.

How does an IP address change affect a classic-asp site on IIS?

One of our customers is planning to change the public IP address of their server where their website is hosted (in-house on IIS).
The website was built with Classic ASP.
What changes are needed on the server after the IP address change, and where would they be?
(I know this question is very vague but this is all the information I have for now - apologies.)
Normally there will be no dependencies on a specific IP address in classic ASP.
IIS ofcourse manages on which IP address(es) and which hostnames the (asp) site will respond (in the bindings setting for the site), and the public DNS settings are responsible for routing the proper hostname to the correct (new) IP address, but ASP code doesn't care about hostnames or ip-addresses, it just responds to whatever IIS thinks should be handled by the site in question.
The DNS will propably be hosted at the companies Internet provider, you should check if the site in IIS has the correct bindings, and if it is not configured to respond to specifically the old IP address.
If the server uses multiple IP addresses you may need to alter the bindings in IIS manager to ensure that the domain of your website is associated with the correct IP, and obviously you will need to update the DNS record for your domain. Neither of these are specific to Classic ASP

Host a site in local IIS with domain

I want to host a site on local IIS 7.5 for internal testing. But I want people can access over the internet.
For this on my rackspace server, I have created an "A" record with subdomain.domainName.com and pointed my static IP address to it.
In IIS I have created a self-signed certificated with *.domainname.com that it can be used to multiple sites.
Now, i have published a site to a local directory and in IIS I have created a site with host name the same domain for which I have created an "A" record.
I have added http and https bindings with port 80 and 443 with the same host name.
But still my site is not working.
The error I am getting is "This webpage is not available"
Can any one help me?
Resolved it my self.
I was missing Port Forwarding in my router software for HTTPS.
In my web-application, each HTTP request is automatically be converted to HTTPS. And I forgot to forward Port 443's request to the machine to which I have set the static IP Address and DNS.
After adding that port forwarding record to the router's software my application is working fine over internet.

Is DNS server And Host file Are different?

I am unsure Whether both DNS server and Host file are the same or different.
I Hosted an application in IIS and created A host name as website1.domain.com and tried to browse it and it didn't work.
When searching on net i found that we need to make entry in DNS server or Host file.
As in most of the sites that I saw mentioned DNS server or host file. I am unsure Whether the both are same or they both are different.
A hosts file is used by Operating Systems to manually specify the IP addresses for specific domains/subdomains - think of it as an override.
DNS however is a server - think of it as a registry - that keeps track of records pertaining to domains, such as A records, MX records etc.
For the purposes of a local test site, an entry in your hosts file would be sufficient, however for a live site, a DNS entry relating to the domain you wish to have your site hosted on would be required.
Choosing which to use comes down to a few things. Does the server upon which your hosting the site use its own DNS server, i.e. a DNS server on the same network, which the connections to the server will be using as well? Does the domain name the site uses have its nameserver set to one that is externally available (i.e. 123-reg.co.uk). If either of these cases are true, you could probably use a DNS server.
If not, is the server hosting the site running on the same machine as the client that will be viewing the site? If so, you can probably use a hosts file, pointing your domains to the localhost IP of 127.0.0.1, ensuring the domains match the bindings in IIS.
Dns server is a server that will help to resolve dns names. ie when you type google.com in your browser , the name will be passed to the dns server provided by your isp. then it will be resolved to ip address by the dns server and your request will be routed to the google ip address by isp network. host file is different one. if you add www.mydomian.com entry in your host file and map it to an ip address 192.168.0.1 then your computer will check ion your host file when you type www.mydomain.com, whether there is any entry for mydomain.com in your host file, and if exists it will be routed to that ip address. in case if there is dns server and you set that server ip in your hnetwork configuration in your pc, then all the domain name request will be sent to that dns server(if there is no host entry exists)

Resources