Question

Multiple TLDs in app platform.

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.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
August 25, 2024

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.

https://ideas.digitalocean.com/

Hope that helps!

- Bobby.

KFSys
Site Moderator
Site Moderator badge
August 23, 2024

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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
Animation showing a Droplet being created in the DigitalOcean Cloud console