Switching App Domains
This topic describes how to change the domain of an existing Pivotal Platform installation, using an example domain change from
In the Ops Manager Installation Dashboard, select the Pivotal Application Service (PAS) tile.
Select Domains from the menu to see the current Apps domain for your PAS deployment. In the following example, it is
In the terminal, run
cf login -a YOUR_API_ENDPOINT. The cf CLI prompts you for your Pivotal Platform username and password, as well as the org and space you want to access. If you do not know your API endpoint, see Identifying the API Endpoint for Your PAS Instance.
cf domainsto view the domains in the space. If you have more than one shared domain, ensure that the domain you want to change is at the top of the list before you apply the new domain to your PAS tile configuration. You can delete and re-create the other shared domains as necessary to push the domain you want to change to the top of the list. If you do this, make sure to re-map the routes for each domain. For more information, see Configuring Routes and Domains.
$ cf domains Getting domains in org your-org as admin... name status yourapps.yourdomain.com shared
cf routesto confirm that your apps are assigned to the domain you plan to change:
$ cf routes Getting routes as admin ... space host domain apps your-space yourapp yourapps.yourdomain.com yourapp
cf create-shared-domain YOUR_DESIRED_NEW_DOMAINto create the new domain you want to use:
$ cf create-shared-domain newapps.yourdomain.com Creating shared domain newapps.yourdomain.com as admin... OK
cf map-route APP_NAME NEW_DOMAIN -n HOST_NAMEto map the new domain to your app. In this example, both the
yourapp, since this is both the name of the app to which you are mapping a route and the intended hostname for the URL.
$ cf map-route yourapp newapps.yourdomain.com -n yourapp Creating route yourapp.newapps.yourdomain.com for org your-org / space your-space as admin... OK Adding route yourapp.newapps.yourdomain.com to app yourapp in org your-org / space your-space as admin... OK
Repeat the previous step for each app in this space. Afterwards, check Apps Manager to confirm that the route URL has updated correctly for each app:
Repeat the above steps for each space in your Pivotal Platform installation except for the System org, beginning with logging into the org and space and ending with confirming the URL update.
Note: Ordinarily the System org contains only Pivotal Platform apps that perform utility functions for your installation. Pivotal does not recommend pushing apps to this org. However, if you have pushed apps to System, you must also repeat the above steps for these apps.
Once you have confirmed that every app in every space has been mapped to the new domain, delete the old domain by running
cf delete-shared-domain OLD_DOMAIN_TO_DELETE:
$ cf delete-shared-domain yourapps.yourdomain.com Deleting domain yourapps.yourdomain.com as admin... This domain is shared across all orgs. Deleting it will remove all associated routes, and will make any app with this domain unreachable. Are you sure you want to delete the domain yourapps.yourdomain.com? > yes OK
Configure your PAS tile to use the new domain, and apply the changes. Apps that you push after your update finishes use this new domain.