6 Steps to Configure Multiple App Domains

John Naguib

by John Naguib on 7/8/2015

Share this:

Article Details

Date Revised:

Applies to:
multiple app domain

One of the feature updates of the March 2013 Public Update for SharePoint 2013 enables you to use multiple app domains in SharePoint 2013 environments with alternate access mapping or host-header web application configurations.

Microsoft introduced a new concept with SharePoint 2013 and Office 365 to extend the out-of-the-box functionality instead of the normal approach of farm solutions. You can now add apps (now called add-ins) through JavaScript code or you can use .NET and host apps outside SharePoint without the requirement to go and deploy code into SharePoint, which increases the reusability, enhances the security and improves SharePoint farm stability and code isolation.

In order to work with these apps, you need to configure the app domain, which is a cornerstone to have apps working. In some cases, you will need to have more than one app domain configured, and I'll explain how in a few lines.

Why do we need multiple app domains?

  • You could use app domain on alternate access mappings or host-header web application configurations.
  • You can configure an app domain for each web application zone and use alternate access mapping and host-header web application configuration.
  • If the web applications cannot have the same application pool identity and authentication scheme.

Steps to configure multiple app domain

Follow the below steps to create another app domain for a specific web application, taking into account that you already have an app domain and this is a new one for your host header web application.

  1. Configure the first app domain: refer to the References links below to configure it if you don’t have existing app domain.
  2. Open SharePoint Shell as administrator and run the following commands:

    $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
    $contentService.SupportMultipleAppDomains = $true

  3. Then reset IIS.
  4. Create a Forward Lookup Zone in DNS for another app domain (testdomain.mycompany.com). Make sure this is a new domain and different from any other domain you created before.
  5. Then run this command:

    New-SPWebApplicationAppDomain –AppDomain “testdomain.mycompany.com” –port 81 –WebApplication http://testsite.companydomain.com

  6. Then reset IIS.

Note: you need to use a port that has not been used before.

Design Notes

  • You cannot use IIS ports that are already being used when you configure app domains.
  • If the app domain is configured to use secure sockets layer (SSL), you must configure the app domain to use a wildcard certificate and bind the SSL to a different port from the web application SSL port.

Overall, apps are an important and interesting topic and it is the future for developing and extending functionality of SharePoint and Office 365. It differs from case to case if you need to have one app domain on your on-premise environment or more than one app domain per the design notes and benefits I presented, but I recommend that if you can, utilize one app domain and share it across all web applications. But if you have design constraints, then you can add multiple web app domains, but know that this will increase the operations effort for configuration and maintenance.




Topic: Administration and Infrastructure

Sign in with

Or register