App Platform - Domains for static sites


Could you tell me, have the App Platform supporting multiply domains/subdomains for different Static Sites? I have a production and dev instance for one project, can I create 2 static sites in one Application and connect two different domains? For production - for dev instance -

I tried to add a new domain in the settings panel and after checking App Spec I saw that a new domain set like the “ALIAS” domain.

Thank you for your help!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

For a configuration like this we recommend creating two separate apps. When an app is deployed, we pull, build, and deploy the latest commit for each component. If one-component fails to build or deploy, all components rollback to the last successful deployment. Running production and staging in the same application might be possible, but would certainly blur lines between staging and production.

As a separate matter, routing between components in the same app is currently only based on path. All domains within the app will be routed the same. Service components can examine the Host header to distinct actions based on hostname, but routing based on distinct domains within an app is not currently possible. We are examining this as a feature.