Create a custom Host Header website set

Source: Internet
Author: User

When we create a website set in a Sharepoint web application, although we can specify the path of the website set, but the Host header of the website set, it seems that the Host Header defined by the web application must be used. For example, when you create a new website set in the Web application "http: // sp2010", the path of the website set can be in the following format:
■ Http: // sp2010/sites/ITG (by using the default "sites" Management path)
■ Http: // sp2010/ITG (by creating a new "ITG" Management path)

However, no matter which path is used, the host header of the new website set still needs to use "http: // sp2010". This host header is used when creating a web application, specified to the Web application.

In fact, Sharepoint allows us to create a website set with custom host headers. For example, in the http: // sp2010 web application, we can create a site set with the access path "

Of course, if you want to use a custom Host Header, first make sure that the DNS system can correctly resolve the domain name of this host header to the correct IP address. For example, if you want to use "" as the host header of the new website set, you may need to add resolution records for this domain name on the DNS server.

To create a website set with a custom Host Header, you must use the powershell command instead of the Web UI. Open the SharePoint 2010 management shell on the Sharepoint Server and use the following command to create a website set with custom host headers:

New-spsite "contoso it group"-owneralias contoso \ administrator-hostheaderwebapplication http: // sp2010

The four parameters of New-spsite specify the path, name, owner, and Web application of the new website set.

In the management center, when you view the website set in the Web application, you will see this website set with a custom Host header.

Because the website template to be used is not specified when the new-spsite command is used to create a website set, the Administrator is prompted to specify a website template for the primary website when accessing the website for the first time.

Finally, it is worth mentioning that not only SharePoint 2010 can support website sets with custom host headers, but SharePoint 2007 already supports this feature. In the SharePoint 2007 system, you can use the stsadm command to create a custom Host Header website set. For example:

Stsadm-O createsite-URL "contoso it group"-ownerlogin contoso \ administrator-owneremail http: // sp2007

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.