I have a security certificate installed on my Ubuntu server, running Apache. When I visit my site using the HTTPS protocol, the green certificate appears at the start of the URL. However, when I use the regular HTTP protocol, the certificate does not appear. This used to be working, but I must have changed something to break it and I don't know how to get it working again. Any ideas? Thanks

2 Answers 2


Er, that's the way it always works. If you are actually looking at a website via HTTP, you're very specifically not using HTTPS, and thus not using the certificate.

You might be thinking of HTTP->HTTPS redirection; you can configure a webserver to redirect all HTTP requests automatically to HTTPS. Even though you type in HTTP, when the page finishes loading, you will see that it is now actually using HTTPS.

So, figure out how to fix HTTPS redirect on your server. You can do this more than one way. A common way is with mod_rewrite, which might help you figure this out. If you were doing it some other way, you'll need to do some more research before we can help you.

  • Ah yes, this makes sense. I seem to recall that it was working previously with mod_rewrite. Can you point me in the right direction for where I need to look for this stuff? Sep 23, 2014 at 2:03
  • I'd suggest kindly starting with reading the documentation, then reviewing your config files for relevant portions. Once you've found something, make a change and test it. If you are puzzled by the results, then edit that into your question so that you can get a technical answer. Right now, you're asking us to troubleshoot this totally blind.
    – mfinni
    Sep 23, 2014 at 2:21

I managed to solve my problem by adding the following lines to the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Not the answer you're looking for? Browse other questions tagged .