6

Can anyone please help me on what is a host header in web application and how can it be configured?

For eg. I create a web application as follows, New-SPWebApplication -Name "Contoso Internet Site" -Port 443 -HostHeader sharepoint.contoso.com -URL "https://www.contoso.com" .. etc etc..

What does that -Hostheader do and what impact it has if we do not add this parameter?

7

The host header is the URL on which the web application will respond. If you specify a host header during the creation of a web application, you'll notice that a binding with the same URL is added in IIS Manager as well. This allows IIS (and thus SharePoint) to respond with the correct content when you request a specific URL.

The web application host header and the IIS binding must match for SharePoint to serve content. Multiple host headers (and IIS bindings) are allowed; you can use alternate access mappings to specify additional URLs on which the same content will be served. If you add alternate access mappings after the default zone created during the web application creation, you must manually add the IIS bindings however!

If you create a web application without a host header, SharePoint will serve content for that web application if the URL specified doesn't match the host headers of any of the other web applications hosted by the server. This is used typically for SharePoint 2013 for app support as the URLs are a prefix, followed by a GUID, followed by your app domain, therefore different for every app. SharePoint uses this no-host-header 9app listener) web application to listen for traffic that doesn't match any of the web application host headers and then routes it accordingly to the appropriate app.

You can only have a single web application with no host header on a particular port per farm (otherwise with two, SharePoint wouldn't know where to route the traffic).

1

Host Header: Host header is nothing but providing a related name as the URL for the web application, by default SharePoint takes only the local server name as a URL and then render the data's from the content DB.

If you want to configure you web application on port 443 than you will get better idea from below links.

SSL Sites with Hostnames in SharePoint 2010 and SharePoint 2013

Create a Web Application With Host Header in SharePoint 2010

You will get better idea about the use of -Hostheader command in the PowerShell Parameters from below link.

New-SPWebApplication

  • is this information works for you? – Hardik Apr 24 '16 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.