By dorii
Hello!
Currently, I have the following setup:
A static site that is served on www.example.com/ and a Node.js app that runs on www.example.com/server. Both are created via the App Platform.
Is it possible to redirect non-www HTTPS traffic (https://example.com/) to www (https:/www.example.com/)?
Or do I have to use a dockerfile and fiddle around with nginx 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!
Hello, if you require it, App Platform can support root domains. Provided your DNS service allows for CNAME flattening or using an ANAME or ALIAS record, you can point the appropriate record to the actual app url (ex. my-do-app-a1bcd.ondigitalocean.app.) From there everything should work for your root domain “example.com”, and you could create a CNAME record for “www” host to point to your root.
If you really want to do what you are asking I believe you may be able to achieve it using URL Redirect Record or an ALIAS record if your DNS service provides them. For example set the redirect or ALIAS record to redirect / point the root domain “@” to www.example.com.
This comment has been deleted
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.