Consider the following scenario.
You create a new Web application in Microsoft Windows SharePoint Services 3.0. Then, you create a new site collection by using the Stsadm.exe command-line tool. For example, you run the following command at the command prompt:
stsadm -o createsite -url http://HostHeaderSiteURL -ownerlogin domain/username -hhurl http://URLOfWebApplication
In the new Web site properties dialog box in Microsoft Internet Information Services (IIS), you import a certificate. Additionally, you enable the site to use HTTP and HTTPS.
In this scenario, when you try to perform a search on the https://URL
Web site, no search results are returned.
This issue occurs if both HTTP and HTTPS are used for the same host header site. You cannot have the same site collection exposed over HTTP and HTTPS, and then perform a search to return results over both protocols. If you want the host-named site collection to be searchable over HTTP, put the host-named collection in the HTTP Web application. If you want the host-named site collection to be searchable over HTTPS, put the host-named site collection in the HTTPS Web application.
To work around this issue, create separate Web applications. Create one Web application that uses HTTP and create one Web application that uses HTTPS. Then, map the Web application that uses HTTPS to the Web application that uses HTTP by using Extend an existing Web application
. After you create the separate Web applications, you must associate the site collection with the new Web applications. In the following steps, assume that you already created a Web application that uses HTTP.
To create a new Web application for the HTTPS site, follow these steps:
- Use an account that has administrative permissions to log on to the computer that is running Windows SharePoint Services 3.0.
- Click Start, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.
- On the Central Administration page, click Application Management.
- On the Application Management page, click Create or Extend Web Application, and then click Extend an existing Web Application.
- On the Extend Web Application to Another IIS Web Site page, type 443 in the Port box.
- Type a host name for the new Web application.
- Under Use Secure Sockets Layer (SSL), click Yes, and then click OK.
After you create the new HTTPS Web application, you must associate the site collection with the new Web application. Then, add the host header information.
To do this, follow these steps:
- Click Start, click Run, type cmd, and then click OK.
- At the command prompt, change to the following directory:
\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
- At the command prompt, type the following command, and then press Enter:
stsadm.exe -o createsite -url https://HostHeaderSiteURL -ownerlogin Domain\Username -hhurl https://URLOfWebApplicationNote In this command, the -url parameter is the URL for the host header-based site collection. The value of the -hhurl parameter is the URL of the web application.