PIT Designs Logo

How to force SSL with .htaccess

I'm the owner and founder of PIT Designs. I love creating digital presence and creative digital solutions for our clients.


Posted 2 years ago on February 22nd, 2019. Last modified on July 22nd, 2019


Tags: |

Up to 35% OFF AliDropship Plugin

When you have SSL enabled (supported by your host provider) it's a good practice to make sure the actual site is running on SSL Secured connection.

To do so, you can force an HTTPS (secured connection) on your website.

Step One

Login to your hosting, and in the Root folder, right click > edit the .htaccess file

 

Step Two

Add these rules in your website's .htaccess file:

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

The .htaccess file needs to be located inside the site's document root folder. If your website is in a sub folder, then the .htaccess should be placed in the corresponding sub folder.

To create or edit the .htaccess file, you can either access the root folder via FTP, or using with the File Manager available in cPanel.


What's .htaccess file?

Lear more about SSL Certificates

Contact us for SSL Certificates

 

Need further assistance?

Read more about SSL Certificates & Website Security. We offer custom solutions per needs.

0/5 (0 Reviews)
Do we all agree that Coffee is the fuel that feeds the free content creating?
Easy Tips to Maintain Your WordPress Site

We love WordPress. It's the leading CMS for creating websites. Here are some Easy Tips to Maintain Your WordPress Site

COVID-19 and E-Learning Trends

The COVID-19 pandemic took the world by surprise, and what is even more surprising is that it's 2021 and the […]

5 Easiest Ways to Create Your Ecommerce Website

You can make an ecommerce website for a brick or a packet of tablets. But what is important is how […]

Proven Tips How to Improve Your Content Strategy with Influencer Marketing

One of the best ways to improve your content marketing is with influencer marketing strategy. This will help you reach […]

How to Increase Brand Awareness with Digital Content Marketing

The digital world is more powerful than ever – and its power keeps growing. If you want to survive in […]

Why is Ethical Leadership Important in Business

How many times have we come across peer pressure and do ethically wrong things? Or Like probably favor a candidate […]

The Importance of Having a Website for Business

If you are running a business without a website, it means you are skipping the step of success. In this […]

Leave a Reply

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

menu-circlecross-circle