• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
MinutesGuide.com

MinutesGuide.com

It is Not Just About WordPress

  • Home
  • About
  • Blog
    • Blogger Talk
    • Email Marketing
    • Hosting Talk
    • Plugins
    • Themes
      • Extra & Divi
    • WPbeginner
      • Guide
      • Life Hacks
      • WP Fix
    • WP Security
    • WP SEO
    • WooCommerce
  • Services
  • Reference
  • Contact
  • Start Here
Home » Blog » WPbeginner » Guide » How to Force SSL On Your Websi…

How to Force SSL On Your Website Without Any Error

Post on September 19, 2020 | Updated on November 29, 2020 by FaizAlias 2 Comments

Are you looking for How to force SSL on your website? After installing SSL, your website enables you to surf with HTTPS. But, by default, when someone visits your website it just redirects HTTP, not HTTPS. Do not worry because it not harm to your website.

But, how you can fix it to force HTTPS on your website to look your website more secure and trusted.

Here is simple tutorial you can follow.

How to Force SSL?

Before we started, here I would like to tell you this tutorial only working on the Apache server type. Not the Nginx server type. Not sure your server running Apache or Nginx? Look tutorial on how to check Apache or Nginx run on the server.

Step 1 Login cPanel/FTP Client

First of all, please login to your cPanel. If your server not provide cPanel, you can use FTP client. For tutorial cPanel or FTP client, you can look on how to use cPanel and how to use FTP client respectively.

But in this case I will use cPanel.

Step 2 Open .Htaccess

After login to cPanel, go to your root installation WordPress file and then find the file .htaccess. If you can’t locate it, maybe your cPanel hides it.

To unhide, go to setting and tick to “Show Hidden Files (dotfiles)” then click save. If you still not find it, make sure to create a new one. No problem.

force ssl

When you have .htaccess file, make sure it on editor mode because we will add some code here.

To turn on it to editor mode just right click on .htaccess file such as image below.

blank

Note: “Setting” I have mentioned above (step 2) is located at the top right on your cPanel. If you still have a problem just drop a comment below.

Step 3 Copy & Paste Code

Here, I will separate it into several parts for specific redirection. You can choose which one you need because all of these code give you different redirection.

Copy one of the code below, and paste into it (.htaccess). When done, click the button Save Change to save what you have edited just now.

» Forcing HTTPS on All Incoming URL

The best method if you want forcing https on all incoming URL via .htaccess is using 301 redirects, which permanently redirects an old URL to a new one.

If you wish so, use this code to paste on .htaccess.

Make sure RewriteEngine On do not repeat write on .htaccess file. Keep just one only.

Usually, you need this code.

» Forcing HTTPS on a Specific Domain

This is for special case and not many use this.

Let’s say that you have two domains: http://domain1.com and http://domain2.com. Both domains access the same website, but you only want the first one to be redirected to the HTTPS url. So, you need to use the following code:

Make sure to replace domain1.com with your desire domain trying to force HTTPS on.

» Forcing HTTPS on a Specific Folder

If you wish to force HTTPS on specific folder for your website, you can do it too. However, the file should be placed in the folder that will have the HTTPS connection.

So, use this code to paste on .htaccess.

Make sure to change the folder references to the actual directory names.

Now, you have setting SSL force redirect to your domain.

I recomend after making these change, please clear cookies and cache on browser to give you best experience when try it.

If you still have problem about redirection to SSL, please drop your comment below.

I will reply it as soon as possible.

Conclusion

In this tutorial, I have shown you how to force SSL on your website. So, when someone visit to your website, it will be redirect to secure page HTTPS. As I told you before, this tutorial only working if your server using Apache.

If you like this article, then please FOLLOW our Linkedin, Twitter, YouTube, Pinterest, and Facebook. Do not forget to check our services page to upgrade your WordPress. If you find this post has an issue with copyright, outdated, or in error, please contact us to fix it.

Related Article..

  • How to Make Responsive YouTube Embed On WordPress Post

Filed Under: Guide, WP Security

Reader Interactions

Comments

  1. blankAneru says

    November 5, 2020 at 5:13 pm

    nice blog

    Reply
    • blankFaizAlias says

      November 5, 2020 at 5:31 pm

      hi…thanks for stopping by here 🙂

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow Me

  • Facebook
  • GitHub
  • LinkedIn
  • Pinterest
  • Twitter
  • YouTube

Start With…

blank
Start Blogging
blank
eShop Guide
blank
WP Guide
blank
WP Security

Categories

blank

Footer

About MinutesGuide

Was founded in October 2017 by FaizAlias. The main goal of this site is to provide quality tips, tricks, hacks in easy way that you can learn it just in minutes.

Highlight Service

Ninja Tables Pro Installation And Setting
CSS Hero Plugin Installation And Setting
Divi Theme Installation & Settings
Build Complete eCommerce Site

Quicklink

Home
Services
Contact
Blog

Copyright © 2021 · Designed by SM Creative Studio | Hosted by Cloudways DMCA.com Protection Status

  • Privacy Policy
  • Terms of Use