Configure site to support the URL reference with and without the “www”
-
04-10-2020 - |
Question
I have created multiple HNSC under a unique Web Application as follows: http://site1.com, http://site2.com, http://site3.com.
I would like to be able to access any of these site collections using both http://site1.com and http://www.site1.com.
Currently, I am able to access the site using http://site1.com but when I try using www I get the following error: Alternate access mappings have not been configured. Users or services are accessing the site http://site1.com with the URL http://www.site1.com.
Do I really need to use an AAM? I was under the impression that this was not necessary if using HNSC. Or do I need to create the HNSC using www?
La solution
Only one URL per zone is allowed for the HNSC collections. this is by design. Now you have two options.
- Remove the exiting default url and add the new url in default zone
- Or add the new url into different zone so both URL will be accessible for the users.
Unable to add URLs using Set-SPSiteUrl in SharePoint 2013 RTM