htaccess code to perform this type of redirect, cPanel added the following code to the. You don't need to do anything further from here (other than test). Choose the hosting scenario for your website: Redirect my cPanel website to HTTPS.
When you save this redirect, cPanel actually sets up the redirect by editing your. Once you install an SSL certificate on your website, you need to redirect your visitors to the secured (HTTPS) version of your site. You can see below how the rewrite was setup before we clicked "Add"
Next to redirects to, enter your website's url using the Shared SSL Certificate.Next to choose the domain name you are working with.log into your cPanel and access the redirects section.To force your visitors to use your Shared SSL certificate:
How to force your visitors to use your Shared SSL Certificate Then be sure to replace with your actual domain name and folder you want to force the SSL on. Make sure you change the folder reference to the actual folder name. htaccess, add this above where there are already rules with a similar starting prefix. If this is all confusing not to worry I will be doing either a workshop version of this blog or a video very soon.NOTE: If you have existing code in your. Force HTTPS Redirect Automatically Using cPanel’s File Manager. You can easy revert back by using your backup version Show them the code that you are using and what you are trying to do. If you do run into problems let your host know. Test your new code with your website and check that you are not getting no 500 errors. Make sure you make a backup of your original. htaccess make sure it is towards the top else you may well run into problems. If you were to land on it will now automatically go to The code above is simply telling the server that if you land on the HTTP version of the website to go straight to the HTTPS version. Force HTTPS Redirect will be enabled and your website visitors will. If you run into problems you can simply just re-upload the backup version. It is better to be safe rather than sorry. When asked to select your domain, choose your. htaccess file up before adding the code bellow. You will need to be logged into your Zen cPanel hosting account and click the ZenBuilder icon to launch this. Warning messing with this file can really make your website turn green make sure you back your. Another use is to redirect visitors from old pages on a. httacess to simply get the server to automatically force https. A common use of redirection is to create shorter, easy-to-remember URLs that redirect to longer URLs. It is also noting this will also work on Shared hosting as well as VPS. You should get no problems if you are using a CMS such as Wordpress or Drupal.
There is also the case as well that about 60% of the top positions in Google have HTTPS.
Your website will be more secure and also looks much more trusting.Google admitted they give a slight boast for HTTPS.There are a few reasons why HTTPS is Good The code at the bottom of this blog will force HTTP to HTTPS.Īll websites can benefit from having a HTTPS certificate installed you don’t need to have a ecommerce site for this to have a benefit. Now you just need to let apache know that you want to show HTTPS instead of HTTP. hosting uses cPanel and there is a simple tool in cPanel that will help you accomplish this. You have a website but you can’t get it to automatically show https even when you have an https certificate installed.īelieve it or not you are half way there if you have your https certificate installed. If you have a secure socket layer certificate (SSL) on your website, you can automatically redirect visitors to the secured (HTTPS) version of your site for a secure connection.