Map URLs to host-named site collections

When you create a new hostname site collection, the default alternate access mappings will still exist but cannot be used. Use Windows PowerShell commands to manage URL mappings for host-named site collections.

Add a mapping to an existing site:

Set-SPSiteUrl (Get-SPSite ‚http://teams.contoso.com‘) -Url ‚http://teamsites.contoso.com‘ -Zone Intranet

Each URL mapping is applied to a single zone. Use one of the following zone names when you map URLs:

Default
Intranet
Internet
Custom
Extranet

If you do not specify the -Zone parameter and the URL mapping entry is new, the default zone is used.

Remove a mapping for a site:

Remove-SPSiteUrl ‚http://teamsites.contoso.com‘

Display all URL mappings for a site:

Get-SPSiteUrl -Identity (Get-SPSite ‚http://teams.contoso.com‘)