IIS Redirect non-www to www

By Paulus, 7 August, 2009

Redirecting non-www to a www domain when Plesk is installed on the server requires additional steps opposed to just having IIS installed on the server.

 

1. Log into Account
2. Under DNS, remove the CNAME for www on non-www domain.
3. Create new domain WITH www (www.example.com)
4. move data from example.com to www.example.com

The following can not be done within Plesk:
5. Start the IIS manager
6. Right click on example.com and go to 'Properties'
7. On the 'Web Site' Tab click 'Advanced' next to the IP address.
8. Under "Multiple Identities for this website", if there's a record there with the "www" select it and remove it.
9. Click 'Ok' to close 'Advanced Web Site Identification' window.
10. Click on 'Home Directory' tab.
11. Under the section: 'The content for this resource should come from:' Select 'A redirection URL'
12. Type 'http://www.example.com' in the field labeled 'Redirect to:'

 

If Plesk is not installed on the server then the following steps apply:

 

  1. Start the IIS manager
  2. Create a new Website by right clicking on 'Web Sites' in the tree view in the left pane of the window. ('New'->'Web Site')
  3. Move data from example.com to the directory you specified for www.example.com
  4. Right click on example.com and go to 'Properties'
  5. On the 'Web Site' Tab click 'Advanced' next to the IP address.
  6. Under "Multiple Identities for this website", if there's a record there with the "www" select it and remove it.
  7. Click 'Ok' to close 'Advanced Web Site Identification' window.
  8. Click on 'Home Directory' tab.
  9. Under the section: 'The content for this resource should come from:' Select 'A redirection URL'
  10. Type 'http://www.example.com' in the field labeled 'Redirect to:'