How to Force SSL and Manage the non-SSL Page Using cPanel

How to Force SSL and Manage the non-SSL Page Using cPanel

You may already know that Google announced back in 2017 if your website doesn’t have an SSL certificate, Google Chrome starts to display a notification marking the sites as insecure.

And nowadays, everyone is trying to migrate their website from HTTP to HTTPS. And if you have a reliable web hosting company, you may get a free SSL certificate with every plan.

Many WordPress users are relying on Comodo or Let’s Encrypt SSL. The best part is if you’re asked to pay for it, you can always use a CDN like CloudFlare to have an SSL certificate free for lifetime.

But the problem occurs when you get mixed content and not all the pages move to HTTPS. In this tutorial, you are going to learn a few things to do after activating SSL.

For a WordPress website, if your web hosting company provide SSL, activate it and update the website address. Sometimes people forget and get a blank page.

Redirect HTTP to HTTPS Using cPanel

As you may already know, WordPress has many rewrite rules, which are controlled by the .htaccess file. And to migrate your traffic from HTTP to HTTPS, you require a redirect rule.

So, it’s obvious to use .htaccess. I hope you know how to edit such a file.

Let me walk you through the process.

Step 1:

Once you login to your cPanel account, open the file manager.

How to Force SSL and Manage the Non-SSL Page Using cPanel

Step 2:

Make sure you see the public_html directory. Scroll down and look for the .htaccess file.

How to Force SSL and Manage the Non-SSL Page Using cPanel

Step 3:

If you don’t see any file, go to Settings at the top-right corner and check the box to show hidden files for document root.

How to Force SSL and Manage the Non-SSL Page Using cPanel

Step 4:

On a popup, confirm encoding by clicking on the Edit button.

Step 5:

A new tab opens up showing codes of .htaccess. Now, copy and paste the code shown below in the file.

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

Save the changes, and you’re done redirecting the traffic from HTTP to HTTPS. But it’s possible that you see mixed content.

For which, you need to use a plugin. Install and activateReally Simple SSL. You don’t need extra settings.

Now check your website if it works fine.

Try 301 Redirect for a few Specific Pages

Some user might not be comfortable adding a redirect code. So, it’s easy to use cPanel’s built-in redirect option. If you scroll a bit, you can find a Redirects icon.

How to Force SSL and Manage the Non-SSL Page Using cPanel

Click to open.

On the new page, you see many fields to fill in. You have to choose the domain name from the drop-down menu, and add the page slug in the box below it.

Then you have to fill in the URL of the same page including HTTPS.

How to Force SSL and Manage the Non-SSL Page Using cPanel

You have to choose the radio button for redirecting with and without www. Click on the Add button, and you’re good to go.

Note: This method is applicable only if you have to redirect a few pages because manual redirection of multiple pages can be overwhelming.

I Hope These Methods Work For You

In most of the cases, whenever you use an SSL plugin, the problem gets solved. And for a WordPress user, using a plugin is the best thing.

No one wants to deal with codes. But sometimes, you need to deal with the .htaccess file to make a redirect. The best part is that almost every web hosting company offers 24*7 customer support if you don’t feel comfortable doing something, feel free to reach out to them.

Conclusion

Making a redirect from HTTP to HTTPS is the first thing, and then you can use the SSL plugin. I hope these two things solve your problem.

If you still see a mixed content error, you need advanced skills to look through the code using Google Chrome developer tools. For now, focus on using a plugin I have mentioned above.

Check out these top 3 WordPress hosting services:

A2 Hosting
£1.50 /mo
Starting price
Visit A2 Hosting
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.8
  • Pricing
    4.0
IONOS
£0.77 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
HostArmada
£1.92 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0

How to Setup Let's Encrypt With Nginx on an Ubuntu 18.04 VPS or Dedicated Server

In this guide, you will learn how to setup Let's encrypt on your Ngnix Server to
3 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install an SSL/TLS Certificate for WordPress with Apache Using a Nginx Reverse Proxy on a CentOS VPS

One of the ways to increase your website’s google ranking is to set up SSL. Th
4 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How To Add Free SSL In WordPress Using Let's Encrypt

Let’s Encrypt is a free open certificate authority that aims to provide SSL ce
2 min read
Idan Cohen
Idan Cohen
Marketing Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top