How to Redirect All Blog Posts From HTTP to HTTPS Without Using a Plugin

After the official announcement by Google, everyone is migrating their website from HTTP to HTTPS. From October 2017, Google Chrome has started showing a notification for being insecure on the site without SSL.

Having an old website with HTTP requires a severe note to apply HTTPS to all the blog posts and pages. Most of the people use the free SSL certificate from a CDN or Let’s Encrypt.

But the problem occurs when you have to force HTTPS all over your WordPress website. Whether you use an Apache server or NGINX, you can make a redirect without using a plugin.

Although for non-techie people, the plugin like Really Simple SSL is recommended. But when you want to avoid a plugin, you can use the .htaccess file to force HTTPS.

Sometimes, after activating an SSL certificate, some of the blog posts don’t adopt the change, and no HTTPS is visible.

In this tutorial, you’re going to learn to redirect all of your blog posts from HTTP to HTTPS without using a plugin. You’ll need to use cPanel.

Edit the .htaccess File Using cPanel When Having an Apache Server

If you don’t have any idea about servers, don’t worry. Let me give me some hints. When you buy a web hosting account from any of the companies like Siteground,InMotion Hosting,Hostinger, etc., you’ll get an Apache or possibly a Nginx web server.

When you think about starting your WordPress website, it’s best to search for the best web hosting and eventually end up buying a shared server.

And if you think about NGINX servers, those are costly and have the different technology, you don’t get cPanel. All you need are the command lines to manage your site on such servers.

For now, concentrate on dealing with the conventional web hosting you use. Follow the steps to make a redirect.

Step 1:

Login to your cPanel account and open the file manager
, it’s the first step to find out your website’s data. A few companies keep the file manager separate, so don’t worry and search a bit.

How to Redirect All Blog Posts From HTTP to HTTPS Without Using a Plugin

If you see a different layout of cPanel, it’s because every company tries to match it with their brand using a different design theme.

Step 2:

On this new page, if you see the home directory,

click on the public_html link from the left sidebar
. All the data of your website resides in the root directory.

How to Redirect All Blog Posts From HTTP to HTTPS Without Using a Plugin

If you run more than one website on the same server, you need to open the respective folder.

Step 3:

Search for the .htaccess file and right-click to edit
. If you don’t find the file, it’s because you may haven’t enabled to display the hidden files from the cPanel settings.

How to Redirect All Blog Posts From HTTP to HTTPS Without Using a Plugin

Click on the top-right corner, click on the gear settings icon, and tick the box to display hidden files.

Step 4:

If you find the .htaccess file and

right-click to edit, a popup appears to confirm if you’re sure to edit the coding file
.

How to Redirect All Blog Posts From HTTP to HTTPS Without Using a Plugin

Click on the Edit button.

Step 5:

A new tab opens up.

Now, you need to add a few lines of code between #Start WordPress and #End WordPress
. Let me show you the code.
<IfModule mod_rewrite.c>
RewriteEngineOn
RewriteCond%{HTTPS}off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Click on Save Changes, and you’re all set. From now onwards, all of your blogs start redirecting from HTTP to HTTPS.

If you have an NGINX server, you can add a few lines of code in the configuration file.

server {
listen80;
server_name yoursite.com www.yoursite.com;
return301 https://yoursite.com$request_uri;
}

Note: Replace yoursite.com with your website’s URL.

You have successfully set up a redirect from HTTP to HTTPS.

I Hope You Can Apply the Redirect Using cPanel

Most of the users have the shared web hosting (i.e. Apache Server), they have to use the code to add in the .htaccess file.

If users are scared of editing the coding file, they can use the redirect plugin which also adds the code in the .htaccess file.

But if you ask any WordPress experts, they always suggest you avoid plugins as much as you can. Are you going to use a plugin or not?

Conclusion

Setting the redirect from HTTP to HTTPS can be tricky in a few situations. Even after the redirect, the website may show other errors, which need advanced skills.

For now, I hope you can easily set up the redirect for all of your blog posts from HTTP to HTTPS.

Check out these top 3 WordPress hosting services:

HostArmada
$2.49 /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
A2 Hosting
$2.99 /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
Hostens
$0.90 /mo
Starting price
Visit Hostens
Rating based on expert review
  • User Friendly
    4.5
  • Support
    3.8
  • Features
    4.3
  • Reliability
    4.5
  • Pricing
    4.8

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
Avi Ilinsky
Avi Ilinsky
Hosting Expert

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
Avi Ilinsky
Avi Ilinsky
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.