By Nifty
Hi there,
I was wondering if it is possible within the same app platform instance where under one TLD I can target my server whilst under another I can target my static site both with the root route?
For example:
api.app.com -> server app.com -> static site.
I had a look through the docs and the community and couldn’t find an example of this unfortunately. Would appreciate any input on this, I suspect I might have to create another app specifically for my static site.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
You are right, you’ll need to create another App for the static website.
I might be wrong but looking at this you’ll need to create the static app.
Hey @nifty,
With the App Platform, as of the time being, what you could do is to use different routes like /api
for your different components rather than subdomains.
So what you could do is have your app.com
domain mapped to your frontend static component, and then app.com/api
mapped to your backend API web component.
https://docs.digitalocean.com/products/app-platform/how-to/manage-services/
If you wanted to have separate domains mapped to different components, the best approach would be to just create separate apps instead.
If you would still like to see that feature enabled, the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.
Hope that helps!
- Bobby.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.