How to redirect http to https on app platform

Hello fellow developers,

I’m using app platform to host a static website, and while my domain is registered on godaddy, I’ve pointed the nameservers to DO and everything is working fine with my domain. The problem happens when I enter the domain using http instead of https. How to redirect all http requests to https? For reference, my domain is According to this question, it’s not possible yet: However, it says here that http should automatically be redirected to https:

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Dikshith Shetty
DigitalOcean Employee
DigitalOcean Employee badge
June 8, 2021
Accepted Answer

Hello @bavly

Yes, the domain will automatically be redirected to HTTPS and there are no changes required from your end. Already, I see the domain with HTTP link is getting redirected to successfully.

You can check the Location field in the below curl output:

curl -I 
HTTP/1.1 301 Moved Permanently
Date: Tue, 08 Jun 2021 17:16:10 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Tue, 08 Jun 2021 18:16:10 GMT
cf-request-id: 0a8e38f747000031b80e123000000001
Server: cloudflare
CF-RAY: 65c3c4387f1a31b8-BOM

The dig output is returning 3 IP addresses in which one associated with Droplet so when it resolves to that IP address you might experience the issue. Please remove that Droplet IP address from A record list:

dig +short

Docs for deleting the DNS record

Best Dikshith

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.