1

I inherited an IIS6 server.

For some reason, the person who set it up didn't enable it to have http://example.com and http://www.example.com go to the same place. If you go to http://example.com it gives you an error page with an "under construction" explanation.

I am a Linux guy, and have never dealt with IIS servers before.

Anyone know how to fix this?

3 Answers 3

2

Check 2 things.

Ping the 2 domains and make sure that DNS is correct. DNS will get you to the server. (which you're probably well familiar with in Linux too)

Then, on the server, edit the properties of the site and in the Web Site tab, click "Advanced". In there, make sure to have at least 2 bindings, one each for www and non-www.

Note: I'm assuming that the Host Header value is set ... which is perfectly fine. If it's not set, then that site will bind for all host headers, which would mean that the issue is DNS, or another site has the specific binding for no-www.

0

Go with Scott's approach - the Host Header values you are looking at are similar to the Apache directory alias parameters i.e. the server looks to see what URL the end user has entered and redirects them accordingly.

You can have IIS bound to multiple, or single public IP addresses, and then for each site you can specify the host header values. We have about 20 sites running off our IIS server, with IIS bound to a single IP address. Each web site in IIS has a particular host header value to reflect the URL of the site needed. If you were to hit our server with just the IP address, it would return the default IIS (no site here) page. Hope that makes sense.

0

Scott's answer should get you there.

However, if this is a site that is concerned about search rankings, it is better to setup one of the domains to do a permanent redirect to the other, so that your ranking doesn't get divided between two domains (google considers www.mydomain.com and mydomain.com to be different).

See this page from Google regarding 301 Permanent Redirects http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93633

In IIS6, you can simply add a new site bound to the same IP address and put the mydomain.com host header on that site.

On the Home Directory tab:

  • instead of specifying a local folder, choose "A redirection to a URL"
  • Redirect To: http://www.mydomain.com
  • check "A permanent redirection for this resource".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .