Adding a custom domain to a non-production environment (i.e. staging and development) is currently a feature undergoing customer beta testing. Access to the beta testing phase is available to all our Elite and Enterprise customers only.
The feature must be activated per project by our team of Support Engineers at this time - please submit a ticket and request this activation if you are eligible for this beta test stage.
Once activated, you can set up custom non-production domains through the use of a set of Platform CLI commands.
To add a custom domain, follow the steps:
- If you are Elite or Enterprise tier, reach out to Support to request Beta testing of the feature for a specific project.
-
Make sure your DNS record points to the target of your non-production environment.
Target:platform environment:info edge_hostname --environment <environment_id>
- Add domain:
platform domain:add <new_custom_domain> --environment <environment_id> --replace <production_custom_domain>
example:
platform domain:add staging.mysite.com --environment staging --replace mysite.com
You can read more about this topic in our public documentation here.