My website is not working on http, but works only https, how do I redirect http to https

Why my website is not displaying the pages:  Example when I type http://domain.com it only display index page, how do I make my website to work on both HTTP and HTTPS

GOOD NEWS: Your website can be redirected from HTTP to secure page HTTPS

How to force your visitors to use your dedicated SSL certificate?

Redirecting to https://www.example.com/ will cause a redirection loop because of 'http://example.com/'

  1. Note: that by default your domain has auto SSL certificate install as our initiative to keep our customer's website secure and encrypted
  2. To force all web traffic to use HTTPS, insert the following lines of code in the .htaccess file in your website's root folder
  3. You need to create ".htaccess" file from your website root directory and add the following content below, this can be inserted on the top or bottom of the file
    1. Note: make sure you put dot "." in front of the file name

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Save it and should redirect HTTP to HTTPS

NOTE: If you already created .htaccess file and its hidden you need to enable hidden file from cPanel's File Manager

  • Go to cPanel -- > cPanel's file manager
  • Click on "Settings" on the top-right menu beside "Search"
  • Check the "Show Hidden Files (dotfiles)"
  • And save 

 

  • redirect http to https, redirect to ssl, https
  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Related Articles

How to sign up for AkolagTech hosting plan - Video

How to sign up for AkolagTech hosting plan?Video Tutorial on how to sign up for hosting plan

AkolagTech hosting platform login and navigation - Video

How to log-in and navigate to AkolagTech platform video tutorial 

AkolagTech Hosting Platform Tutorial (Web, Email, Cloud) info

How to log-in and navigate through the hosting platform  Access to your product and services...

HOW TO INSTALL SOFTWARE, PLUGINS, AND APPS ON YOUR AKOLAGTECH HOSTING ACCOUNT?

ABOUT THE HOSTING PLATFORM AkolagTech hosting platform for SME/SMB, developers (web developers,...

How to transfer domain from existing provider to AkolagTech

HOW TO TRANSFER YOUR DOMAIN FROM CURRENT PROVIDER TO AKOLAGTECHFROM OTHER PROVIDER PLATFORM...