APPLIES TO: 2013 2016 2019 Subscription Edition SharePoint in Microsoft 365
To enable users to install and use apps for SharePoint in their sites, configure your environment to support them. This article describes how to configure your environment to support apps. Use the Plan for apps for SharePoint Server article to review options and determine the values to use for configuration settings in this article.
You must configure a new domain in Domain Name Services (DNS) to host the apps. To help improve security, the domain name should not be a subdomain of the domain that hosts the SharePoint Server sites. For example, if the SharePoint Server sites are at Contoso.com, consider ContosoApps.com instead of App.Contoso.com as the domain name.
When an app is provisioned, it provisions a unique DNS domain name (for example, Apps- 12345678ABCDEF.ContosoApps.com, where 12345678ABCDEF is a unique identifier for the app). You need a wildcard Canonical Name (CNAME) entry for your DNS domain to support these unique names.
Depending on your configuration (for example, if you are using WINS forward lookup), you might have to create a new forward lookup zone first, or you can start with a wildcard CNAME entry in the same zone as the SharePoint Server site domain. In the following procedures, you create a forward lookup zone, and then create a wildcard alias record for the DNS domain name that allows for individual apps to create unique domain names within your app domain. In these procedures, we use DNS Manager for Windows Server 2012 R2. If you have a different type of DNS server, follow the procedures in the documentation for that server type.
To create a forward lookup zone for the app domain name
You have now created a forward lookup zone (and a domain name) to use for apps in your environment.
To create a wildcard Alias (CNAME) record for the new domain name
You can verify the new domain name and alias by pinging them.
To verify the new domain name
If you are using Secure Sockets Layer (SSL) for the SharePoint Server sites in your environment, or if you use any apps that use data external to the SharePoint Server sites, you should use SSL for your apps. To use SSL, you create an SSL certificate for your app domain (for example, ContosoApps.com).
The domain should be added in the form of a wildcard (for example, *.ContosoApps.com). You need a wildcard certificate instead of individual certificates because each installed app has its own subdomain.
In order to allow support for SSL offloading with SharePoint Server App Domains, enable support for multiple app domains by using the following Microsoft PowerShell commands:
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $contentService.SupportMultipleAppDomains = $true $contentService.Update() iisreset
Apps rely on the App Management and Microsoft SharePoint Foundation Subscription Settings service applications. Use the following procedures to configure them.
To turn on the Microsoft SharePoint Foundation Subscription Settings Service
Next, create a Subscription Settings service application and proxy by using Microsoft PowerShell. Use the example script provided at New-SPSubscriptionSettingsServiceApplication.
You also need an App Management service application. The following procedures provide the steps to configure it.
To create a App Management service application
In this section, you specify the app domain and app prefix to use for apps in your environment. The app URL points to your app domain and a prefix that determines how each app is named.
Use the following procedure to configure app URLs.
To configure app URLs
Important Restarting the WWW Service will also restart the IIS Admin Service and the Windows Process Activation Service. This will also shut down all Web sites and applications that depend on these services and they may lose existing state and will be unavailable until the services successfully restart. You should plan to perform these steps during a planned maintenance time. > To complete the App prefix rename tasks, perform these steps: > Stop the SharePoint Timer service. > Restart the World Wide Web Publishing Service that hosts the apps. > Start the SharePoint Timer service.
If you host multiple tenants in your environment, you must use Microsoft PowerShell to configure app URLs for each tenant. Use the following procedure to configure them.
To configure app URLs by using Windows PowerShell
Set-SPAppDomain Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
Important Restarting the WWW Service will also restart the IIS Admin Service and the Windows Process Activation Service. This will also shut down all Web sites and applications that depend on these services and they may lose existing state and will be unavailable until the services successfully restart. You should plan to perform these steps during a planned maintenance time. > To complete the App prefix rename tasks, perform these steps: > Stop the SharePoint Timer service. > Restart the World Wide Web Publishing Service that hosts the apps. > Start the SharePoint Timer service.
For more information, see Set-SPAppSiteSubscriptionName and Set-SPAppDomain.
The SharePoint Store contains apps for SharePoint intended for use with sites that require Internet-facing endpoints. By default, these apps are not available (greyed out and cannot be purchased) because they are incompatible with most sites. However, if your farm is configured to allow internet-facing end points, you can turn on the Internet-facing endpoints feature to show these apps in the SharePoint Store. You turn on this feature in Central Administration.
To configure Internet-facing endpoints for apps
In some cases, for example, when you have an on-premises SharePoint Server farm where updates are installed infrequently, you will need to run a cmdlet to update the URL used to point to the SharePoint Store:
Set-SPAppStoreConfiguration -Url http://office.microsoft.com -Enable $true