Hello, I have a question about domains on the app platform. I have two services: the first is a landing page, and the second is an app. My idea is that the landing page should have the domain xyz.com, and the app should have the domain app.xyz.com. I tried changing the settings in the app, but it doesn’t work. Currently, both services (the landing page and the app) are on the same app.
Could you please tell me how I can do it?
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.
Hi there,
If you have both services in the same app, consider splitting them into separate apps for better domain control.
Once they are in separate apps, you could follow the stpes here on how to add custom domains to each app:
Let me know if this works for you!
- Bobby
You need to set up separate domains for your landing page and app by configuring custom domains in the DigitalOcean App Platform. First, go to the App Platform dashboard, select your app, and navigate to the Settings tab.
Under Domains, add xyz.com for your landing page service and app.xyz.com for your app service. Make sure each service is mapped to the correct domain. Next, update your DNS settings by adding an A record for xyz.com pointing to your App Platform’s assigned IP and a CNAME record for app.xyz.com pointing to the main domain.
If you’re using Cloudflare or another DNS provider, check if proxying is enabled, as it can sometimes interfere. After making these changes, deploy the app again and test the domains