Report this

What is the reason for this report?

Can I redirect a domain towards another, both pointing towards the same App

Posted on February 12, 2024

Hello everyone,

I have a DO App and I currently use two sub-domains, let’s say beta.example.com and my.example.com, that point towards the APP with a CNAME record.

After using the beta subdomain for a while, I now want to make the my.example.com subdomain the default one. Can I redirect all beta.example.com requests to my.example.com using DO ? I already searched if that was a feature available at the DNS level of my domain provider but no luck.



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.

Heya @support0ce4966f9e47942ec54621b,

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 beta.example.com and my.example.com (or similar).

The other way would be again using CNAMEs or using DigitalOcean Droplet to redirect the request from there.

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.