Report this

What is the reason for this report?

Redirect from non-www and default DigitalOcean domain to www

Posted on February 27, 2024

I’m using the App Platform for my web application and have added two domains: www.example.com and example.com. The default DigitalOcean domain https://some-digital-ocean-default-domain.ondigitalocean.app is still in place and can’t be removed. I want to ensure that visitors going to https://example.com or the default DigitalOcean domain (https://some-digital-ocean-default-domain.ondigitalocean.app) are automatically redirected to https://www.example.com. Is there a solution or workaround to achieve this?



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 @ekofriend,

I’ll urge you to check the following question:

https://www.digitalocean.com/community/questions/app-redirect-from-non-www-to-www

This is where a similar situation has been discussed and resolved.

Hope it helps!

Hi there,

Quick update here, App Platform now supports subdomain routing, which also allows you to disable an app’s starter domain.

For setup instructions, see How to Manage Domains in App Platform.

- Bobby

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.