Blog

Switching to Host-Named Site Collection in SharePoint

Switching to Host-Named Site Collection in SharePoint

Host-named site collection (HNSC) allows you to assign a site collection with a unique DNS name behind it. 

HNSC differs from a path-based site collection, which requires you to use the same DNS name assigned to the web application as to all site collections beneath it. 

Deciding when to use host-named vs. path-based site collections is a matter of your specific needs.

Microsoft has a recommended a maximum of 20 web applications per farm, so host-named site collections can help a situation where one wants to have more than that above maximum unique domain names for their site.

Host-Named Site Collections

Migration

To migrate using an existing path-based database, you need to follow the MBRRU process. This, of course, stands for Migrate, Backup, Remove, Restore and Upgrade.

This process must be done after you create the web application that will host all of your host-named-based site collections. This process will convert your content database to use host-named-based site collections.

Assumptions

These instructions assume that you have already installed your SSL certificate. This also assumes that the site collection for the web application you are bringing over is at the root. If this is not the case, you can still follow this tutorial, though you may have to specify the path.

Step-By-Step

Breaking the steps down a bit further:

  1. Mount – This will mount the SQL backup of the SQL database from your existing source database server to SharePoint.

  2. Backup – This command will back up the existing site that was just mounted to your web application.

  3. Remove – This will remove the Site Collection, which is path based.

  4. Restore – This will restore the site collection as hostname based, which adds the HostHeader of the web application to your mounted content database from Step 1.

  5. Upgrade – This will upgrade your content database from 2013 to be compatible with the SharePoint 2016 features.

Commands

The commands you should run following the MBRRU process look like this:

Mount-SPContentDatabase -name "ContentDBName" -webapplication http://servername:port/
 
Backup-SPSite http://example.com:port -Path C:\SiteBackup\anyfilename
 
Remove-SPSite http://example.com:port
 
Restore-SPSite https://example.domain.com -Path C:\SiteBackup\anyfilename -HostHeaderWebApplication http://servername:port -ContentDatabase "SP2016_WSSContent_Database"
 
Upgrade-SPSite https://example.domain.com –VersionUpgrade

Conclusion

Typically, it is best to decide your site collection model while you are designing your SharePoint farm. While it is possible to change in the middle, it would be much harder since you would have downtime during the conversion.

If you are interested in learning more, please contact sales@dmcinfo.com to talk to a DMC expert today.

Learn more about DMC's Microsoft SharePoint solutions.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts