I have designed a website using React and Django. Both end are working through DO app platform using github repositories. I have purchased the domain from Godaddy. Everything is finished now and I want to connect my domain to my website. I followed the DO instructions and changed the nameserver on Godaddy. The website is working now with https://www.example.com but it is not working with https://example.com. I want to redirect the non-www to www for anyone mistakenly tries that.
Problem is there is no way I could find in DO settings. I can’t create an ‘A’ redirect because the forwarded value is not an IP address but it is an url given by DO for the app. I cannot do that from godaddy settings ‘forwarding’ options because this just resets all the nameservers back to godaddy nameservers.
Is there a way to do 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.
Click below to sign up and get $200 of credit to try our products over 60 days!
Note that not all DNS providers support this method for root domains, known as CNAME flattening or using an ANAME or ALIAS record. I believe that GoDaddy does not support this yet.
What you could do instead, is to switch your DNS management to DigitalOcean:
That way when you add your non-www domain name to your App Platform, it will automatically take care of the DNS records for you.
Let me know if you have any questions!