To force redirect from http to https, and from www. to no-www., insert in .htaccess following code:

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.

  • SSL, Apache, .htaccess
  • 1 uporabniku/om je bi članek v pomoč
Vam je bil odgovor v pomoč?

Povezani članki

 How do I turn off Directory Listing in cPanel?

In cPanel scroll down to the Advanced section and choose "Index Manager"Choose to open "Web root"...

 How to enable HotLink protection in cPanel

To enable hotlink protection in cPanel: Click on Hotlink Protection on the main screen of...

 How to show hidden files in cPanel File Manager

You can edit dotfiles (like .htaccess for example) via cPanel File manager, but they're "hidden"...

 What is the difference between the cPanel Dedicated License and the cPanel VPS License?

The type of cPanel license you need and use depends on the type of server that has been set up;...

 cPanel Supported Virtual Environments

cPanel products support the following virtual environments: Virtual environment...