Glitch SSL Certificate


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?


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.

if (location.protocol != 'https:') {
 location.href = 'https:' + window.location.href.substring(window.location.protocol.length);

Code was taken from StackOverflow.


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!/force-http-or-https


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

Please help!


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