Solved

IIS site working when using DNS name but not IP

Posted on 2014-04-09
6
272 Views
Last Modified: 2014-05-29
have a site running on IIS7.  We have a DNS records for it xxx pointed to the server 192.168.44.12.  When we use the DNS name to get to the server and the correct site (not default).  If we delete the host header xxx and then use the IP to connect we can do that also. But we cannot do both.  Is there a way to config IIS to accept both?
0
Comment
Question by:wannabecraig
  • 4
  • 2
6 Comments
 
LVL 28

Expert Comment

by:becraig
Comment Utility
If I am reading you correctly you are asking:

If you can connect to the site by both IP and hostname (w/o configuring a host-header) ?

If my assumption is correct that this is what you are asking, I will need to ask one question, how many Ip's / sites are on the server in question.

Are any of the sites configured in IIS on that server set to respond on "ANY" ip ?

Why would you want to remove the host-header (Doesn't it make your life easier to have the site bound to the IP by the host header) ?
0
 
LVL 1

Author Comment

by:wannabecraig
Comment Utility
THere is only one IP and two sites.
0
 
LVL 28

Expert Comment

by:becraig
Comment Utility
You need host header to resolve to the site by Address since you are using one IP

IIS will see which site the request is for and forward it to that site.

So if you are hosting multiple sites, you will need to define the host you want to hit.

Since they are both using the same ip there is no real way to tell IIS which site you are trying to get to.
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 28

Expert Comment

by:becraig
Comment Utility
Are you still unclear on this ?
0
 
LVL 1

Author Comment

by:wannabecraig
Comment Utility
Yes
0
 
LVL 28

Accepted Solution

by:
becraig earned 500 total points
Comment Utility
Your question:
have a site running on IIS7.  We have a DNS records for it xxx pointed to the server 192.168.44.12.  When we use the DNS name to get to the server and the correct site (not default).  If we delete the host header xxx and then use the IP to connect we can do that also. But we cannot do both.  Is there a way to config IIS to accept both?

Short answer:
NO

You will not be able to call the site by ip if you have more than one site bound to that IP (that is the idea behind host headers)
You CANNOT have two sites on one IP and expect to call each site by IP (how do you expect IIS to know which site you need to access.

Once you have more than one site bound to one ip host headers is the only way to get proper functionality.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IIS 8.5 10 45
Enable IIS Logging via GPO 4 59
smtp server IIS 6 9 37
Redirect HTTP to HTTPS in Azure (With Load Balancer) 2 30
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now