How to Redirect HTTP to HTTPS in WordPress without Plugin

Table of Contents

If you recently bought an SSL certificate and wanted to redirect HTTP to HTTPS without using any plugin on to your WordPress site, then this simple .htaccess file will help you out. Using this code, you can force http to takes to https without loosing traffic of your WordPress site. Using this small code, you can easily  forces https to load by default across the website.  Let’s find out, how to implement this code.

The God of Search Engines, Google, recently announced that the https will help rank the websites well on search engines. Thus, the demand of SSL certification has increased.

Now, everyone has started implementing SSL certificate on to their websites including WordPress.

Once, you have purchased the SSL from the hosting service provider or via third party, it is important to redirect the http to https in a correct way. A silly error will cause huge traffic loss.

Thus it’s a crucial part.

Here, I am going to guide you, how to redirect from HTTP to HTTPS without using Cpanel or WordPress Plugin.

So, let’s begin the process.  I am assuming that, the SSL is successfully installed on your domain.

What things will required to implement this:

  • You will need an FTP access of your website.
  • FileZilla software
  • A Notepad or HTML editor tool, like Dreamweaver.

Let’s start it and follow these steps:

  • Open FIleZilla application.
  • Connect to the home directory of your website.
  • Locate ‘.htacess’ file.
  • Right click and download it on your computer.
  • Open this file using notepad or dreamweaver tool

Now, simply copy the below code on top of the code to your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

NOTE: Make sure to change ‘yoursite’ to your website name.

  • Save this file.
  • Make sure to take a backup of existing “.htaccess file:”, before uploading the new file on live website.
  • Now you are done!!

Now, if you open your website without www or http, it will now redirect to

Hope this guide help, if yes, then don’t forget to share this with your friends and on social sites,

× Live Chat