How to force redirect HTTP to HTTPS website in CyberPanel?

In this article we will tell you how to force redirect HTTP to HTTPS website in CyberPanel?

What is HTTP?

HTTP stand foe Hypertext Transport Protocol. When you enter http:// in your address bar in front of domain, it tells the browser to connect over HTTP. HTTP use TCP(Transmission control protocol), generally over port 80, to send and receive data packets over ther web.

What is HTTPS?

HTTPS stands for Hypertext Transfer Protocol Secure (also referred to as HTTP over TLS or HTTP over SSL). When you enter https://in your address bar in front of the domain, it tells the browser to connect over HTTPS. Generally sites running over HTTPS will have a redirect in place so even if you type in http:// it will redirect to deliver over a secured connection. HTTPS also uses TCP (Transmission Control Protocol) to send and receive data packets, but it does so over port 443, within a connection encrypted by Transport Layer Security (TLS).

Redirect from HTTP to HTTPS

if you forcefully redirect your website HTTP to HTTPS in Cyberpanel, you will need to add a rewrite rule to that website in order to have it automatically forward to HTTPS instead of HTTP.

In CyberPanel you can forcefully redirect HTTP to HTTPS website using rewrite rules.

To add this:

Force redirect HTTP to HTTPS website in CyberPanel:

  1. Select Websites on the left menu
force redirect HTTP to HTTPS website in CyberPanel

2. Choose the SSL enabled website from the list

force redirect HTTP to HTTPS website in CyberPanel

3. Select “Rewrite Rules” in the Configuration section

force redirect HTTP to HTTPS website in CyberPanel

4. Copy and paste the following code:

force redirect HTTP to HTTPS website in CyberPanel
rewriteCond %{HTTPS} !on
rewriteCond %{HTTP:X-Forwarded-Proto} !https
rewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

5. Now just save your changes, and you’re done!

After doing this on OpenLiteSpeed you must have to restart your webserver. Beacuse OLS need to restart to read the rewrite rules properly.

How to add ZeroSSL on your site? Free SSL for your website?

Read More: How to Change Upload limit On CyberPanel?

How to Change Upload limit On CyberPanel?

How to solve the can’t upload the file on file manager issue in CyberPanel?

if you are uploading a file on file manager in CyberPanel. and getting some error there. Follow this short solution for can’t upload the file on CyberPanel file manager.

Solution

There is very easy and short solution for this issue. Access your root through Bitvise or putty open your terminal(CLI) and run this Command

Systemctl restart lscpd

This simple command will restart all of your CyberPanel services and now if you can try you can easily upload any file but there may be upload limit issue if so you can follow this tutorial to solve that Link below.

How to Change Upload limit On CyberPanel?

Get 15$ Free on Digital Ocean, $15 Free Promo Code on Digital Ocean 2021

Get 15$ Free on Digital Ocean

Are you looking for Promo Code on Digital Ocean? Get 15$ free credit on digital ocean using this Promo code.

Use this Promo code and get 15$ free on Digital ocean.

You can use these Free 15$ for your Droplet and get a 1CPU basic plan free for three months.

Free $15 Coupon Code for Digital Ocean:

Use this Code to get 15$ Free Code

DOPRODUCT15

Here is another one you can get free digital ocean credits using this also.

LOWENDBOX
Free $15 Coupon Code for Digital Ocean
Sign Up Now

Digital Ocean is also giving $100 for 60-days on signup. Go here and get it.

Other Coupon Code for Digital Ocean:

Get 10$ free more

DROPLET10
ACTIVATE10

Go to digital ocean and enjoy free credit now.

How to Install Node Js on Windows?

Follow US on Facebook / Twitter Instagram .

Read More: How to migrate WordPress Site using Migrate Guru Step by Step guide