Skip navigation
Knowledge Base    Hosting    cPanel: Redirect HTTP to HTTPS automatically

Redirect HTTP to HTTPS automatically

Last Updated: Oct 17, 2019

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. Name.com hosting uses cPanel and there is a simple tool in cPanel that will help you accomplish this.

Enforcing SSL for main domain / Startup Hosting:

  1. Log into your cPanel 
  2. In the Domains section, click the Domains icon.Screen_Shot_2019-07-12_at_8.20.19_AM.png
  3. This will open a page where you can toggle the HTTPS redirect on or off. We recommend leaving it on. If there is no option to enable HTTPS, it's because that domain does not have SSL installed. First make sure SSL is installed and the option will present itself.

Screen_Shot_2019-07-12_at_8.25.08_AM.png

Your domain should now be using HTTPS.

 

Enforcing SSL for Addon domains:

Linux uses .htaccess files to handle redirection.

You may need to create a .htaccess file, and you can use your control panel's File Manager.

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

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

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already existing RewriteEngine On.

 

Can't find what you're looking for?
Open a Support Ticket
Submit a request

Anytime 24/7

Give us a call

+1 720.249.2374

Monday-Friday   9AM to 4PM
Mountain Time, Denver, USA

Live Chat

Monday-Friday   6AM to 6PM
Saturday-Sunday   9AM to 5PM
Mountain Time, Denver, USA