1

What is the correct approach for web application and why?

First approach

  • create web applications with different ports

Second approach

  • create web applications with host header and one port

Third approach

  • one web application with multiple sites collections aka HNSC
2

Don't create web applications with different ports unless you have a very good reason to do so. Your users will always have to type the port numbers in their URLs, and you will need to insure that your custom ports are not blocked in your network, or used by other network services.

Usually bad: http://SharePoint.local:81 and http://SharePoint.local:82

Host headers are a very good idea. They produce "natural" URLs and should never be blocked by your network.

http://SharePoint.local http://sales.SharePoint.local

Host Named Site Collections (HNSC) are also good as they are clean URLs. Choosing between #2 and #3 is largely around special needs for security, features and backup/disaster recovery.

Host Named Site Collections in a single Web Application:

  • All site collections are stored, by default, in a single database. The admins can create multiple databases and manually set where each new site collection is stored. (Good use of PowerShell scripts to build site collections.)
  • Any Feature enabled at the Web Application level impacts all Site Collections.
  • New Site Collections must be created using PowerShell (HNSC is not supported in Central Administration.)
  • A bit more administration work as HSNC not supported in Central Administration.

Separate Web Applications:

  • Can have unique Features enabled, and each have their own web.config files for any unique configurations needed. (Authentication, etc.)
  • Can be fully managed in Central Administration, or by using PowerShell.
  • Have their own unique database(s) that can be backed up and restored separately.
  • Can be individually moved/copied to another farm (for dev testing, etc.)
2

I strongly recommend to have only one content Web Application on port 80. Then create your site collections as host-named site collections instead of path-based site collections. It's a far more efficient, scalable and flexible architecture. This is also how Microsoft hosts site collections in Office 365.

With Web Applications you're practically limited to 20 different host headers. With HSNC you can support as many sub-domain as needed with a single Web Application. For example:

http://intranet.contoso.com http://example.contoso.com http://mysite.contoso.com http://hr.contoso.com

Multiple host-named site collections can use the same host-header. For example:

http://intrant.contoso.com/ http://intrant.contoso.com/sites/site1 http://intrant.contoso.com/sites/site2 http://intrant.contoso.com/projects/project1

I would only recommend multiple content Web Applications if you need total isolation between them or if you need to install and support a third-party application that needs special configuration on that level.

  • You are most welcome !!! – yash.kamdar Oct 29 '18 at 12:38
1

Host Header Site Collections are not very manageable on-prem, I usually recommend not using them.

Instead, have no more than 4 Web Applications if at all possible. This would include:

  • Primary content Web Application
  • My Site Web Application
  • SharePoint Apps Web Application
  • A secondary content Web Application, if you absolutely must

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.