I have a web application with a root site collection:


I have further host named site collections like this:


Note: "bu" is just a host header managed path.

Then I have sites under these site collections like so:


Is it possible to add/change a site's URL from https://sp.site.com/bu/dept1/site1 to https://site1.site.com?

If not, is it possible to add/change a site collection's URL from https://sp.site.com/bu/dept1 to https://dept1.site.com?

I have tried to use Set-SPSiteUrl to add a URL for a site collection but I get an error message saying this can only be applied to the root site collection at https://sp.site.com.

Any other methods within or outside of SharePoint?

  • how you created the bu/dept1, as hostname site using powershell or managed path based site collection? i dont think you can change the url at subsite level but you can at site collection if it HNSC.
    – Waqas Sarwar MVP
    Mar 9, 2016 at 13:45
  • Hi Waqas, I mention in my question the site collections are host named site collections. "bu" is a host header. I also thought you could change HNSC URLs, but I think the limitation is when using Set-SPSiteUrl you can only change the URL to the root site collection, i.e at sp.site.com
    – Submits
    Mar 9, 2016 at 13:48

1 Answer 1


Yesm You can only change the url of the root site collection of HNSC. Here is what technet is describing;

The Set-SPSiteUrl cmdlet only applies to the root site collection for a host name that is, http://www.contoso.com. This cmdlet cannot be directly run against a managed path site collection underneath the root that is, http://www.contoso.com/sites/test.

But if you want to change it, then I am thinking of backup and restore option. Create new HSNC site collection using the new url, then take the backup of existing and restore it on newly created.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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