IIS Redirect non-www to www
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.
- Log into Account
- Under DNS, remove the CNAME for www on non-www domain.
- Create new domain WITH www (www.example.com)
- move data from example.com to www.example.com
The following can not be done within Plesk:
- Start the IIS manager
- Right click on example.com and go to ‘Properties’
- On the ‘Web Site’ Tab click ‘Advanced’ next to the IP address.
- Under “Multiple Identities for this website”, if there’s a record there with the “www” select it and remove it.
- Click ‘Ok’ to close ‘Advanced Web Site Identification’ window.
- Click on ‘Home Directory’ tab.
- Under the section: ‘The content for this resource should come from:’ Select ‘A redirection URL’
- Type ‘http://www.example.com’ in the field labeled ‘Redirect to:’
If Plesk is not installed on the server then the following steps apply:
- Start the IIS manager
- Create a new Website by right clicking on ‘Web Sites’ in the tree view in the left pane of the window. (‘New’->‘Web Site’)
- Move data from example.com to the directory you specified for www.example.com
- Right click on example.com and go to ‘Properties’
- On the ‘Web Site’ Tab click ‘Advanced’ next to the IP address.
- Under “Multiple Identities for this website”, if there’s a record there with the “www” select it and remove it.
- Click ‘Ok’ to close ‘Advanced Web Site Identification’ window.
- Click on ‘Home Directory’ tab.
- Under the section: ‘The content for this resource should come from:’ Select ‘A redirection URL’
- Type ‘http://www.example.com’ in the field labeled ‘Redirect to:’