Managed paths for host-named site collections are different from managed paths for path-based site collections. Managed paths for host-named site collections do not apply to path-based site collections; nor do managed paths for path-based site collections apply to host-named site collections. Managed paths created for host-named site collections are available to all host-named site collections within the farm regardless of which Web application the host-named site collection is in. You must create a root host-named site collection for a host name before you can create a managed path host-named site collection for that host name.
You can create a managed path for use with host-named site collections by using the Windows PowerShell
New-SPManagedPathcmdlet with the
-HostHeaderparameter, as shown in the following example:
New-SPManagedPath pathname -HostHeader
New-SPSite http://host.header.site.url/pathname/sitename -OwnerAlias DOMAIN\username -HostHeaderWebApplication http://servername
Remove-SPManagedPathcmdlet, as shown in the following example:
Remove-SPManagedPath pathname -HostHeader