How to Migrate Path-Based Site Collection to Host-Named Site Collection in SharePoint 2013

As you know, in a web application, path-based site collection shares the same host name; host-named site collection is assigned to a unique host name. This is the primary difference between path-based and host-named site collections. And according to TechNet’s comparison of host-named site collections and path-based site collections table, you realize the scalability of host-named site collection. You may even wonder how to convert an existing path-based site collection to a host-header site collection. In this post, I’ll show you how to do that in three steps using Windows PowerShell.

In this example, I created a path-based site collection using the following URL: http://chauo15sql:13608/sites/Test

Step 1: Backup of a site collection

Run the following command: Backup-SPSite http://server_name/sites/site_name -Path C:Backupsite_name.bak

In this example, I used the following command line Backup-SPSite http://chauo15sql:13608/sites/Test -Path C:BackupTest.bak then press Enter

Step 2: Remove an existing site collection

Run the following command: Remove-SPSite –Identity “http://sitename” –GradualDelete –Confirm:$False

In this example, I used the following command line Remove-SPSite -Identity http://chauo15sql:13608/sites/Test -Confirm:$False then press Enter.


Step 3: Restore a site collection backup from the backup file to a host-named site collection

Run the following command: Restore-SPSite -Path file_serversharesite_name.bak -HostHeaderWebApplication http://server_name

In this example, I used the following command line Restore-SPSite -Path C:BackupTest.bak -HostHeaderWebApplication http://chauo15sql:13608 then press Enter.

 To finish, add the host to your SharePoint site and run the site.

All SharePoint Versions

The web parts are functional components that extend your SharePoint environment whether it’s hosted, on-premises, or part of Microsoft® Office 365.

SharePoint 2013, 2016, 2019, Online (Office 365)

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2013, 2016, 2019


Product Suites

Experience greater power and savings by bundling our SharePoint apps and web parts.

Essentials Suite

Essentials Plus Suite

Bamboo Premier Suite

Project Management Suite

Knowledge Management Suite

External User Manager


For more information on our product suites, contact us.

Featured Services

SharePoint Health Check

A SharePoint Health Check will identify the causes of issues and risks associated with your specific environment, and is custom tailored to provide you with the best recommendations to optimize your SharePoint environment.

SQL Health Check

Document recommendations relating to performance, stability, availability, or a specific focus you request of your SQL Server database instances.

My SharePointXperts

The truth is that each SharePoint skill may not be a full time job for many organizations, and it is nearly impossible for one person to do everything you need – so augment your team with SharePointXperts; providing the skill sets you need when you need them!