Swap Domains

Swap Domains Between Environments

The Swap Domains feature lets you switch bound custom domains between production and testing environments. This provides a fast way to release a tested application version while keeping the previous version available for rollback.

How Domain Swapping Works

Instead of applying updates directly to the live environment, you can clone the production application, test changes in the cloned environment, and then move the production domain to the updated copy. At the same time, the previous production version remains available in the other environment.

Safer releasesChanges are tested in an isolated environment before they become publicly available.
Fast version switchThe bound custom domains are exchanged without redeploying the application in production.
Rollback readinessThe previous application version remains in the original environment and can be restored by swapping the domains again.
Reduced downtimeThe domain switch avoids many manual deployment and configuration steps on the live environment.
!

Bound custom domains only

Swap Domains works with domains bound through the platform. If the environment is accessed through a public IP, swap the external IPs or update the relevant DNS records instead.

Prepare the Production Environment

1

Locate the production environment

Find the live environment containing the application that needs to be updated.

2

Confirm the bound custom domain

Open the environment settings and verify that the production domain is listed in the Custom Domains or Domain Binding section.

3

Test the current production application

Open the application through its custom domain and confirm that the current version is operating normally before creating the test copy.

Production environment with a bound custom domain
Confirm that the production environment has the required custom domain.

Create and Update a Test Environment

1

Clone the production environment

Create an identical copy of the production environment. The clone should include the application packages, settings, databases and other required components.

2

Open and validate the clone

Launch the cloned environment and confirm that the application works correctly before making changes.

3

Apply the application update

Deploy the new project version, edit the configuration or add the required features in the cloned environment.

4

Test the updated application

Open the cloned environment and complete functional, integration and performance testing without affecting the production project.

Updated test environment
Apply and validate changes in the cloned environment.

A second custom domain is optional

The swap can work when only the production environment has a bound custom domain. However, binding a separate test domain to the cloned environment makes pre-release testing easier.

Swap the Domains

1

Open environment settings

Open the Settings of either the production or testing environment.

2

Open Custom Domains

Navigate to the Custom Domains section. The Domain Binding subsection shows the domains currently assigned to this environment.

3

Select the target environment

In the Swap Domains subsection, select the environment with which the current environment should exchange its domains.

4

Review the listed domains

Confirm the domains currently attached to both environments before proceeding.

5

Click Swap

Start the operation and confirm the domain exchange when prompted.

Swap custom domains between environments
Select the target environment and click Swap.

Single-domain transfer

If only one environment has a bound custom domain, the operation transfers that domain to the selected environment instead of exchanging two different domains.

Verify the Updated Application

1

Open the production domain

Access the normal production custom domain after the swap is complete.

2

Confirm the new application version

Verify that the domain now opens the updated application from the testing environment.

3

Run production checks

Test login, application workflows, database connectivity, integrations, SSL and any custom-domain redirects.

4

Monitor the application

Review logs, response time, errors and resource usage after the domain switch.

Updated application available on the production domain
The production domain now opens the updated application version.

Rollback Considerations

Because the previous application version remains available in the other environment, rollback can usually be performed by repeating the domain swap.

!

Plan for database changes

Domain swapping changes traffic routing, but it does not automatically reverse database migrations or synchronize data written after the release. Make sure both application versions are compatible with the active data model before relying on a quick rollback.

Application rollbackSwap the domains again to direct production traffic back to the earlier environment.
Data compatibilityConfirm that the old version can safely use the current database schema and stored data.
User-generated dataPlan how new transactions, uploads or content created after release will be preserved.
MonitoringKeep the previous environment running until the new version has passed production validation.
Updated application available on the production domain
The production domain now opens the updated application version.

Expected Result

The production custom domain is reassigned to the updated environment, making the tested application version available to users. The previous version remains in the other environment and can be used for investigation or rollback.

Important Notes

  • Swap Domains works only with custom domains bound through the platform.
  • Use external-IP swapping or DNS changes when public IP addresses are used as entry points.
  • Clone and test the production environment before applying the swap.
  • Review the domains assigned to both environments before clicking Swap.
  • Validate SSL, redirects and integrations after the switch.
  • Keep the previous environment available until production verification is complete.
  • Plan database and user-data compatibility before depending on domain swapping for rollback.

Common Issues and Solutions

Swap Domains option is unavailableConfirm that a custom domain is bound through the platform and that the feature is enabled by the provider.
Target environment is not listedVerify that both environments belong to the same account and are eligible for domain swapping.
Production domain still opens the old versionClear browser and CDN caches, then confirm the domain assignment in the Custom Domains settings.
SSL warning appears after the swapVerify that the target environment supports the bound certificate and complete any required SSL configuration.
Application works but integrations failReview environment-specific URLs, callback addresses, CORS settings and external allowlists.
Rollback causes data errorsRestore a compatible database state or deploy a backward-compatible application version before swapping back.

What’s Next