We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

multiple websites on same IIS- domain problem

Medium Priority
663 Views
Last Modified: 2012-05-11
Hi,

How to host multiple websites/domains on same IIS? I created 2 websites on same IP address with different ports(like http://22.34.45.66:5060/  and other one http://22.34.45.66:5050/ ). Now, I want these 2 to point to my domain but I cannot? I have websitePanel installed but I cannot point domain to website?

Any advise?
Comment
Watch Question

Commented:
Are you referring the 'domain' to a Windows 2003 Active Directory Domain?
If yes, all you need to do is to join your IIS server to the domain. The default settings should allow it to register with the DNS server in your domain. Now you should be able to access the web sites via
http://mydomain:5060 and http://mydomain:5050.

Author

Commented:
Is it not possible to hide port in domain name url?

Commented:
Yes you can.
You need to do 2 things,
1) Configure your DNS to redirect 2 different hostnames to your IIS IP address.
E.g Point alpha.com to 22.34.45.66, and point beta.com to 22.34.45.66
2) Add a domain name in the host header property in each of your website in IIS.
E.g. For website A,
IP: All Unassigned
TCP Port: 5050
Host header: alpha.com

E.g. For website B,
IP: All Unassigned
TCP Port: 5060
Host header: beta.com

If i am not wrong you should now be able to access
http://alpha.com/ and http://beta.com/ as http://22.34.45.66:5060/  and http://22.34.45.66:5050/ respectively
Sigurdur HaraldssonSystem Administrator

Commented:
As jax79sg said. Personally, I think you forgot to set the host headers for the domains in the IIS so the web server doesn't know how to handle the requests for the domain names.
SteveArchitect/Designer
CERTIFIED EXPERT

Commented:
different port numbers are usually used to separate multiple websites on the same domain but if the websites are on different domains you should be using hostheaders.

http://support.microsoft.com/kb/324287

Author

Commented:
Before, I missed host address, now I added it. I have 2 IP addresses on VPS. I am using secondary now not primary IP address.

Now ,

both http://alpha.com/ and http://beta.com/ showing me "Default Website" of IIS

I have configuration like below:

Website > Description: Alpha.com
      > IP address: 22.34.45.66
      >TCP Port: 5060

Multiple identities for this web site > 

IP address   TCp Port  Host Header value
22.34.45.66   5060      alpha.com
22.34.45.66   5060      www.alpha.com


Any advise?
IT Manager
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
SteveArchitect/Designer
CERTIFIED EXPERT

Commented:
agreed. port 5060 is usually used for SIP so this will confuse many.
Unless you specifically want to use ports, id set it all back to defaults of 80/443.

Author

Commented:
I managed to run one domain with website but domain has issue with "www", lets say

http://alpha.com ---- works and show content

while

 http://www.alpha.com  ---- do not show content?

I added domain name "alpha.com" in DNS setting of domain A Record.

Any advise?
Sigurdur HaraldssonSystem Administrator
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Host header has both alpha.com and www.alpha.com

Should I add 'A Record' for both alpha.com and www.alpha.com?

Sigurdur HaraldssonSystem Administrator

Commented:
You can use either A record or a CNAME for www.alpha.com since you already have an A record for alpha.com
SteveArchitect/Designer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.