Http not https in emails - fix as an admin?

AI-generated summary

A Discourse site admin, hbevolve, is experiencing issues with emails containing HTTP links instead of HTTPS. Falco suggests checking the “force https” site setting, but hbevolve can’t find it.

Falco provides a solution that requires accessing the server via console, but hbevolve doesn’t have access to the server backend. Falco clarifies that the commands need to be run on the server where Discourse is running.

hbevolve is unable to access the server and seeks further assistance. hbevolve also asks if it’s possible to disable the HTTP version of the site, and Falco explains that the code will redirect people from HTTP to HTTPS.

Later, hbevolve discovers that their site is hosted by Discourse and doesn’t have access to the Rails console. IAmGav suggests contacting Discourse support, which hbevolve does, resulting in a swift resolution of the issue.

Hi there I have seen a few posts about the fact that emails are coming through to users with HTTP links instead of https, and that is happening to us, but the responses to fix it confuse me.

I am only an admin in our Discourse site and do not have access to the back end of our server. Is there any way I can change what comes through in the emails without going in there, and if we have to, what has to be done?

Our site is at https://www.community.evolveauthoring.com but the email links come through as HTTP://www.community…

Many thanks in advance!

New installs are affected by a bug at the moment that is causing a site setting to not be set. Can you search for the “force https” site setting on your site admin ?

We’ve had this site for quite a few years now - i have gone and looked for the word force in settings but no results…

Oh, you will need to do this via the console then:

#ssh into the server
cd /var/discourse
./launcher enter app
rails c
SiteSetting.force_https = true

Yeah that’s the bit I don’t get - is that in our website hosting somewhere or in the Discourse interface? (I wasn’t around when it was installed and don’t have access to evolveauthoring.com backend!)

You need to remotely access the server where Discourse is running to type those commands.

Gotcha. Thanks so much for the assistance, I’m hoping I can find someone with the login details for our server now and get them to give it a go!!

Hey @Falco one more question - can we “turn off” our HTTP version of the site so that people don’t get confused and try to login, or is that essentially what the code you gave us will do? Thanks!

This! That code will redirect people trying to got over HTTP to HTTPS, and it’s what you need.

Hello Rafael!

Thanks for your help so far. So we finally got to look at this, and it appears we do not host the community and have no access to the Rails console - it’s our domain - but according to aws route53 - it goes pushed to discourse.

What happens now?! Thanks :slight_smile:

you are correct, your site is a discourse hosted site, send an email to support and they will fix it.

team@discourse.org

An amazingly fast response from the Discourse team and we now have https at last!!! Thanks to all.