By bikmazefe
Hello,
I have a Rails app deployed to the DO App Platform and I added my custom domain and pointed the name servers to DO. But the problem is that I want any requests coming to mydomain.com to be redirected to www.mydomain.com, and I already configured the app to handle this 301 redirect. But I still couldn’t get this to work.
I’m aware that there are many other posts about this problem but none of them helped me. Any ideas?
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!
Hello, @bikmazefe
I believe a similar question was asked before in our community. You can check the original question here:
https://www.digitalocean.com/community/questions/app-platform-how-can-i-redirect-non-www-to-www
Regards, Alex
Hi @bikmazefe
At the moment it’s kind of tricky to have to redirect. There are multiple questions where this has been asked. Just like Alexdo has provided you with some similar questions here are a bit more that can help you in your search:
https://www.digitalocean.com/community/questions/redirecting-root-domain-to-www-app-platform
https://www.digitalocean.com/community/questions/how-to-setup-cname-to-redirect-static-app-platform
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.