0

I have a heroku application with a domain from godaddy.

My site is built with node and express.

My website is www.juanitacalendar.de and I want it to always redirect to HTTPS (no matter if the users types the www or not).

Should I handle this within Heroku? Within node/express? In my index.html?

I've read in another answer that I'm suppose to use this code that has to do with apache. I am clueless on where to put this piece of code though.

RewriteEngine On
RewriteCond %{HTTPS} !^on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Capsule
  • 6,118
  • 1
  • 20
  • 27
Wilfredo Casas
  • 419
  • 2
  • 6
  • 14

1 Answers1

0

There are many ways you could achieve this.

In your situation, it looks like you can get Node/Express.js to redirect for you. See this answer for more information: Heroku NodeJS http to https ssl forced redirect.

dbradley771
  • 5
  • 1
  • 6