Page 1 of 1
Website automatisch met https openen.
Posted: Wed Dec 16, 2020 8:36 am
by jvmiert
Hoe kan ik mijn website automatisch met https laten openen?
Re: Website automatisch met https openen.
Posted: Wed Dec 16, 2020 8:47 am
by BaconFries
Have you purchased a SSL certificate first? If so then to use https you will also need to setup a 301 redirect using .htaccess
If you haven't already purchased then you can contact your host as they may be able to provide this and assist with the .htaccess as well.
Re: Website automatisch met https openen.
Posted: Wed Dec 16, 2020 8:51 am
by jvmiert
Yes I have the SSL and certificate activated
Re: Website automatisch met https openen.
Posted: Wed Dec 16, 2020 10:19 am
by Pablo
Dit moet je op de server configureren via .htaccess
Re: Website automatisch met https openen.
Posted: Thu Dec 17, 2020 5:38 am
by BaconFries
As previously mentioned you will also need to configure a .htaccess file on your host / server to do the redirect from http to https. You can try one of the following examples.
Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301]
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Note whichever example you decide to use then it is required that you replace www\.yoursite\.com and example.com with your own url. If further help is needed on the implementation of this you should contact your host.