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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
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.