I have a DO App with a custom domain:
The app has three components
Is it possible to redirect/rewrite the last two components to a subdomain?
Is there a way to achieve this natively with die DigitalOcean App Platform?
Or is there any reasonable alternative? For example, adding a new component with an Nginx at my-app.com/ with a reverse proxy.
Any input and thoughts would be much appreciated.
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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
You can partially do this with URL Redirects.
See: https://docs.digitalocean.com/products/app-platform/how-to/url-rewrites/#configure-a-redirect
The thing is, you need a route to be configured to a component (specifically for /docs and /api). App Platform doesn’t currently support domain only matching for components, so you’d either need to host those as separate apps with different domains OR redirect to docs.my-app.com/docs and api.my-app.com/api (or similar).
It doesn’t have to be as redundant, but multiple components under the same app can’t have the same route (“/”).