Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong site comes up if I dont use www. in front of the domain name

Status
Not open for further replies.

Elvar

MIS
Jun 9, 2004
50
IS
I have an IIS server that runs a few sites, each under a different domain.

For example, each has the same web site under IIS.

A.com

B.com

C.com


Everything works like it should when I go to but when I go to C.com somehow A.com comes up. A.com and B.com work correctly.

I have checked the advanced button on the Web site settings. It shows that the site responds to the correct IP address under both and C.com

When I do iisweb /query all three sites come set up exactly alike.

I'm stumped, anyone know what I should do next?
 
Are you using different IP's for each web-site? If so check you DNS records and make sure each site is pointing to the proper IP.

Are you using one IP for all sites? If so, not only do the same DNS check but make sure your host headers are set up properly.

Another thought, Verify that each web-site is pointing to the proper home directory for the site.

Jesse Hamrick
 
Each site has its own ip because each site has its own wildcard certificate.

The DNS is correct for all sites.

and the home directory is correct, since points to the right place and B.com is for the same site.
 
You can use the httpd.ini file to re-direct any request for non to i.e.

RewriteCond Host: ^B.com
RewriteRule (.*) [I,RP]

This file sits in the root of your site
Assuming ISAPI_Rewrite is installed of course


delete and recreate the hostheader for the non- on c.com.


Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Chris,
I just deleted the host header for c.com through the gui. Checked to see if it worked or not, got bad host name error. Good I thought.
Then I added the host header again for it and a.com still comes up :(

I havent tried the rewrite yet
 
You are correct Chris,
The ISAPI_Rewrite would have to be installed.
 
do the correct sites come up for the SSL port?

have you tried setting all the http sites to the same IP or to "All Unassigned" and allow the host headers to do the directing?

Obviously leave the individual IPs set for the SSL ports.

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Thanks Chris,

Connecting to the ssl port works the same.
Tried setting the sites to all unassigned, nothing changed.
Webbug is a cool program :) The correct ip responds but the wrong site is sent through.

Only thing I can think of is that when I was setting the host headers for the ssl ports by doing cscript adsutil.vbs set /w3svs/blablabla and so on that something went wrong there. But when I do /query everything is still the same set up correctly.
 
Been looking a bit deeper into this but still havent come up with anything conclusive.

I queried all the ssl host headers, they are all set correctly this time (was some problems which I fixed). I'm still having the same problems. :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top