Force HTTPS / SSL for cPanel domain

Add the following to the top of the .htaccess file in your websites document root to force https:// (SSL) on the domain. If you are using our web hosting, you can use the web file manager or access it using an FTP client. A valid LetsEncrypt SSL certificate should be generated automatically for your domains.

RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

This works for any Apache or LiteSpeed web server.
  • ssl, https, rewrite, htaccess
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Install ownCloud on CentOS 6

We will be setting up ownCloud on a fresh CentOS 6.6 64-bit installation. ownCloud is an open...

Install PPTP / PPP Proxy Server on CentOS 6

PPTP Proxy is an easy to setup proxy server that can be used as an OpenVPN alternative, and many...

Install VNC Server and Desktop on CentOS 6

Install the desktop environment that we will use:yum groupinstall Desktop -yInstall the TigerVNC...

Install Multicraft 2.0 on CentOS 6

Run a Minecraft server? Multicraft is the most commonly used management control panel for...

Setup Teamspeak 3 Server on Linux (CentOS)

If you run a gaming community, a Teamspeak 3 server is probably a popular choice for you to have...

Powered by WHMCompleteSolution