• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.

Recommended Providers

Fully Managed WordPress Hosting
Fully Managed WordPress Hosting

WordPress Theme

WordPress Hosting Divi WordPress Theme

Forum Membership

Forum Membership

Error while adding redirect (301) rule on Cpanel to force ssl

Started by Chris, October 31, 2019, 11:50:08 AM

WordPress Hosting


I am new to server and cpanel. I have successfully purchased and installed ssl certificate on my domain. Now when I try to add redirect (301) for http to HTTPS for all traffic under cpanel its giving error " The is error in Apache rule while processing your request".


Try redirecting using .htaccess rewrite rule:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]


If you are using Wordpress or any other CMS software then in URL use https:// instead of http:// or SSL plugin.
Get Premium Web Hosting from Dewlance


To set the redirection from HTTP to HTTPS use below code under .htaccess file

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


Hi everyone,
I know this is old post and you have also post right thing about redirection to https.
I just want to add that you can also redirect from http to https from cpanel:
- Login to cpanel
- Under domain section click on "Force HTTPS Redirect"
- From this you can redirect your website from http to https without adding code in .htaccess file.

According to me this is the easiest way for the https redirection.

WordPress Hosting