Question

I have come across situation where I need to change App domain name which we set in early steps of configuring environment for SharePoint add-in while creating isolated app domain.

I read somewhere (Microsoft document), there should be only one App Domain for a SharePoint farm. According to this I have only two options: 1. Remove existing app domain name and create new one. 2. Rename existing app domain.

  1. Which approach is recommended and how to do it?
  2. What will be its impact on installed apps/add-ins?
Was it helpful?

Solution

I have never found an official source on that question, but i have changed the app domain several times.

Answer to question 1:

As you already mentioned, you cannot configure two App-Domains in SharePoint. You have to change it. This is a very straightforward process:

  • Configure the new AppDomain in DNS and create a wildcard-record as described here
  • If you have SSL-Encryption enabled, you need a wildcard-certificate for the new domain
  • Change AppDomain in SharePoint CentralAdministration (CA -> Apps -> Configure App URLs). You should keep the AppPrefix unchanged, as this would require additional steps.
  • If SSL: Change the certificate on the related binding in IIS
  • Perform an IISReset and test your Apps
  • Delete the old AppDomain in DNS

Answer to question 2:

Normally an App does not contain any hardcoded URLs, as the first part of the AppDomain gets randomly generated at first deployment. So there is no impact on changing AppDomain if Developers follow the guidelines.

As always: Try this in a testfarm, if you have a complex environment with lots of apps. Maybe some developers use hardcoded AppURLs, even if they shouldn't.

OTHER TIPS

Thanks @MHeld. I did change app domain initially set in Configure the app URLs to use step.

Windows PowerShell command to configure app URLs:

Set-SPAppDomain <appDomain>

Everything is working fine. It did not make any change to my existing apps and no further changes required as apps link is generated dynamically. Dynamically generated link structure is some what like below - Reference

URL Format

One thing we need to keep in mind that to configure appDomain in DNS. Link:

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top