We had a requirement in Office 365 to create a site collection with a friendly URL. Before we move to the solution, I would like to explain about Host-named site collections and Path-based site collections.
Using Windows PowerShell script we can create hosted named site collection, which has to be assigned to unique DNS name.
Eg. In SharePoint Administrator when we create a new site the host URL will behttp://portal.Test.Com/sites/TeamA.So here the host is http://portal.Test.Comwhich has same DNS record for it. But what if we had to create site collection named ashttp:/hr.Test.com?
In SharePoint Administrator, we will not find any option to create hosted named site collection and as mentioned above we can using Windows PowerShell. So this is what we called Host-named site collections.
Path-based site collections is the regular way of creating a site collection using SharePoint Administrator or Windows PowerShell.
In Path based the sitecollection URLS will be http://portal.test.com/sites/site1 ,http://portal.test.com/sites/site2 etc.
All the site collections will have same host name and DNS name as per the web application.
Now we have a little bit of understanding about Host-named site collections and Path-based site collections.
Below Windows PowerShell script can be used to create Host-named site collections.
New-SPSite http://hr.test.com –OwnerAlias “Test\sam” –HostHeaderWebApplication http://portal.tes.com –Name “Sam Site” -Template “STS#0”
Now the site is created and we need to have DNS record entry for the same. The DNS record will be pointing to the place where SharePoint farm DNS entries are being maintained.
Read some SharePoint 2013 PowerShell tutorial:
- E-mail notification using PowerShell script in Office 365
- Increase SharePoint Online Storage Quota using PowerShell
- Working with SharePoint Online Management Shell
- GridView in PowerShell in SharePoint
- Upload document using PowerShell Remotely
Hope this will be useful.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials: