I'm trying to create a site collection (search center) on a HNSC web application. When I run the PS command, I get the following error:

New-SPSite : A site collection could not be created as the provided hostheader managed path does not exist. Change the URL to use an existing hostheader managed path or create the missing hostheader managed path prior to calling this command.

We have other site collections created on the web app without issue, but I don't understand why its asking for a managed path in this case - I've tried creating the managed path and re-running but same error. Any ideas?

$SearchSite = New-SPSite -Url $NewSearchSiteUrl -Name $SearchSiteTitle -HostHeaderWebApplication "https://hnsc" -Template $SearchSiteTemplate -OwnerAlias $SearchOwnerAlias 

Your Answer

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

Browse other questions tagged or ask your own question.