Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

the company im working at handle the hosting our self. we got www.domain.com up now and we want to make the domain.com to work as well. we use iis7. i seen some articles and found one with url rewrite setting that can be added to iis7. my question is how whats the best way to go? we dont want to cut any corners we want to do it proper.

Much appriciated for answers. this is the article i mensioned above http://weblogs.asp.net/owscott/archive/2009/11/27/iis-url-rewrite-rewriting-non-www-to-www.aspx

plus i been looking at this, is this enough? windows 2008 DNS Website without www?

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

We did change the DNS and the iis Headers but the problem was in our platform provider and their routes so the changes could not take effect. We had the question about the URL rewrite on the table but found a more general solution for us (we got support for 23 countries) instead and did a rewrite script in our squid proxy and we could make it more general that all requests that comes in without the www gets it put infront.

thanks for your anwsers guys

share|improve this answer
add comment

As Khaled mentioned, the URL Rewrite method is for search engine optimizations to redirect non-www to www.

To get both URLs (www and non-www) to actually work in the first place, there are two steps needed:

  • Make sure that DNS accepts both www and non-www (like in your 2nd link)
  • If you use host headers in IIS, make sure to add both the www and non-www domain names.

I've put together some videos that help explain this and which you may find useful at your company since you are managing this yourself. You can find them at http://dotnetslackers.com/projects/LearnIIS7/. Weeks' 2 and 5 talk about DNS and IIS bindings.

share|improve this answer
add comment

It is enough to setup the proper DNS records to get the website working with and without wwww.

Usually, it is done by pointing the domain name to the server IP and by defining the www as CNAME to the same domain.

The article in the first link you provided describes a possible optimization as they said. They said that rewrite rules are defined to make search engines see only one site not two.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.