As you know, in a web application, a path-based site collection shares the same hostname; a host-named site collection is assigned to a unique hostname. 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 collections. 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 http://www.example.com -Path file_serversharesite_name.bak -HostHeaderWebApplication http://server_name
In this example, I used the following command line Restore-SPSite http://www.hnsc.com -Path C:BackupTest.bak -HostHeaderWebApplication http://chauo15sql:13608 then press Enter.
To finish, add the host to your SharePoint site and run the site.
Questions on how to migrate a bath-based site collection to a host-header site collection? Contact us or check out our online documentation!
SharePoint Online
The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.
Supports Classic and Modern sites for SharePoint Online/Microsoft 365
Small Business Pricing and Discounts
SharePoint
Top SharePoint Online Products
Experience greater power and savings by bundling our SharePoint apps and cloud parts.
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 2016, 2019, 2022 – Classic Pages Only
SharePoint
Top On-Premises Only Products
Experience greater power and savings by bundling our SharePoint apps and web parts.
Our team of Microsoft 365 Technology Consultants helps you get the most out of your Microsoft technology, we have the best Microsoft 365 talent to streamline your organization.
Consulting to Streamline Your Department
M365 Plus
Managed Services
Microsoft 365
Consulting to Streamline Your Department
Our Consultants Have What You Need
Federal Contractors
Microsoft 365
Our Consultants Have What You Need