How are 301 redirects made for websites on the DO App platform?
I would like to redirect certain pages such as:
domain.com/my-old-page/ redirects to domain.com/my-new-page/
I should mention that the content is being generated with Hugo static site generator.
Thank you for your time.
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.
This comment has been deleted
We don’t currently offer the ability to configure arbitrary redirects, though it is functionality we are considering.
You could run nginx as a service within your application using a Dockerfile. We have an example nginx Dockerfile and configuration available in our sample repos at https://github.com/digitalocean/sample-nginx. To avoid unnecessary load, I recommend keeping your existing routes for the huge application, and add new routes to nginx just for the parts you want to proxy.
There is another similar discussion related to routes & redirects that you may want to read over as well:
Let me know if you have any further questions!
With App Platform, you can: