Search code examples
sslhostingweb-hostingshared-hosting

Hosting a website with active SSL certificate, however, navigating to www.example.com leads me to Http instead of Https


I'm using a shared hosting website to host the website and I have a SSL certificate. When I navigate to www.example.com, I don't see the padlock and it says the website is not secure, however, if I navigate to https://example.com or http://example.com, I see the padlock and it says the website is secure.

What am I meant to do to make it so that when a user types www.example.com to be sent to the https://example.com version? Do I have to forward the domain to https://example.com or do I have to fiddle with some htaccess settings?


Solution

  • Check Ben's answer here:

    https://stackoverflow.com/a/1270281/7118098

    This is an .htaccess edit, assuming you're using Apache on your host.

    The problem is that you're manually accessing https:// so it works, but accessing http:// doesn't redirect you because it's not https:// enforced.