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.
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
Locate the production environment
Find the live environment containing the application that needs to be updated.
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.
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.

Create and Update a Test Environment
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.
Open and validate the clone
Launch the cloned environment and confirm that the application works correctly before making changes.
Apply the application update
Deploy the new project version, edit the configuration or add the required features in the cloned environment.
Test the updated application
Open the cloned environment and complete functional, integration and performance testing without affecting the production project.

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
Open environment settings
Open the Settings of either the production or testing environment.
Open Custom Domains
Navigate to the Custom Domains section. The Domain Binding subsection shows the domains currently assigned to this environment.
Select the target environment
In the Swap Domains subsection, select the environment with which the current environment should exchange its domains.
Review the listed domains
Confirm the domains currently attached to both environments before proceeding.
Click Swap
Start the operation and confirm the domain exchange when prompted.

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
Open the production domain
Access the normal production custom domain after the swap is complete.
Confirm the new application version
Verify that the domain now opens the updated application from the testing environment.
Run production checks
Test login, application workflows, database connectivity, integrations, SSL and any custom-domain redirects.
Monitor the application
Review logs, response time, errors and resource usage after the domain switch.

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.

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

