How to force my site from Http to Https


Good Day everyone,
How i can force my site to use Https? i am using Heroku and Godaddy, i already tried force-ssl package, but when i try to access my site using http it redirects me to the instead of https//
Thanks in advance


I use a hacked version of the force-ssl package for one app (which uses subdomains for different tenants, which is why the actual package wasn’t working for me – at least, not 3 years ago when I set the app up) and, for all others, I use nginx for both ssl termination and for redirecting http to https. The guide section about forcing SSL provides a few ideas.


if it’s redirecting you to, it might be because of your ROOT_URL. What are you using as ROOT_URL?


on the tutorial that i followed, i can’t change the default root url in heroku, and all i can do is to point it from godaddy.


Try heroku config:set ROOT_URL=




@saintjs did it work? did you solve your problem with another solution?


Thank you all. i first solve my problem by writing a script to force my site to redirect to https, and also i tried to change the root url on heroku dashboard and it works really well now using force ssl package.


Just do it in cloudflare it will redirect faster than loading and running a script.