Glitch SSL Certificate


#1

Some of my users are saying that my website does not have a valid web certificate (SSL/Not Secure).
How do I add a SSL Certificate to my website?


#2

Simply redirect the user to the secure version of the site, since the redirect is not automatically provided. This can be done simply by adding this too the <head> of your website.

<script>
if (location.protocol != 'https:') {
 location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
}
</script>

Code was taken from StackOverflow.


#3

Glitch provides SSL for all projects out of the box. It’s possible for users to visit the http rather than https version though. As nathejd suggests, you can force it to always use https. If you’d like a server-side solution, take a look at https://glitch.com/edit/#!/force-http-or-https


#4

It doesn’t work. Multiple people besides me gets the same error about it not being secure.
It happens when the following are used:

https://www.printnet.glitch.me
http://www.printnet.glitch.me
www.printnet.glitch.me
http://printnet.glitch.me
https://printnet.glitch.me

Please help!


#5

You’ll want to make sure not to redirect to the www subdomain. The certificate we provide with Glitch is for any *.glitch.me domain, but does not include any www.*.glitch.me. Take a look at your check.js file and remove the www on the redirect. Hope that helps!