Question

How to set a subdomain on the app platform?

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?


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
March 5, 2025
Accepted Answer

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:

https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/

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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.