https as default

I have setup a virtual server with an SSL certificate on our GPL virtualmin server. The site works a treat and clearly I can add as many secure sites as I want with their own SSL certificates, which means SNI functions as expected. But the issue I’m having is that if I just type the address in the address bar of a browser or Google the domain name, it seems to default to the http version of the site. Is there a way to get it to always go to the https version. For example if I type in http://www.domainname.com, I would always like it to resolve to https://www.domainname.com instead. Would be good if this didn’t affect alias though (just to make it more difficult).

Many thanks.

Roger

Howdy,

If you go into Server Configuration -> Website Redirects, you can add a website redirect the pushes the browser over to an https connection.

Just setup the redirect to point to https://domain.tld, and check the “Enable redirect for Non-SSL website” option.

-Eric

Thanks Eric, took a bit for my slow mind to grasp and after a few “Failed to save redirect : Missing or invalid source URL path” errors finally got it to work.

Thanks again.
Roger