You can force your visitors to be redirected from HTTP to HTTP inserting following code in your .htaccess file:


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

If you want to force also the redirect from www. to no-www., use instead following syntax:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • .htaccess, SSL, https
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

 Linux Directory and File Structure

Linux Directory/Folder StructureFrom amongst the several directories found within your cPanel...

 Shared Linux Hosting Plans Technical Specifications

    Cardboard Basic Starter disk space 10 MB 1 GB 2 GB monthly traffic 20...

 Reseller Linux Hosting Plans Technical Specifications

    Starter disk space as provided by plan monthly traffic as provided by plan...

 DNS Configuration for Shared Hosting Plans

In order to use our Linux Shared Hosting Plans, you need point the domain using one of the...

 How to backup your site to a FTP server with cPanel

cPanel offers an easy and powerful way to backup your site, storing your backup set on a remote...