Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

IIS site working when using DNS name but not IP

Posted on 2014-04-09
6
282 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 29

Expert Comment

by:becraig
ID: 39988991
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
ID: 40001507
THere is only one IP and two sites.
0
 
LVL 29

Expert Comment

by:becraig
ID: 40013752
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 29

Expert Comment

by:becraig
ID: 40035819
Are you still unclear on this ?
0
 
LVL 1

Author Comment

by:wannabecraig
ID: 40064881
Yes
0
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40064923
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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