Knowledgebase

(SSL) Redirect HTTP to HTTPS automatically (SSL)

Redirect HTTP to HTTPS automatically

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.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Accessing Web Disk and WebDav

Web Disk (also known as WebDAV) is a drag-and-drop interface in cPanel which allows you to access...

How to use FTP via Windows Explorer

Microsoft has developed an easy way for you to connect and upload files to your website. This...

Why can’t I access my website and cPanel?

Sometimes you find the website hosted with us inaccessible, and there is no update on our Status...

cPanel Reseller Linux User Guide

The information listed below describes the various sections and buttons/features visible within...

How do I cancel my hosting?

In order to cancel your hosting you need to log in to your account. Next select "My Services"...