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 4 years ago on February 22nd, 2019. Last modified on July 22nd, 2019

Related To:

Tags: |
Tips On How To Be Safe When Using The Internet

We all know the importance of staying safe on the internet. With how much time we spend online these days, […]

How a Rephraser can Help you Improve your Social Media Presence

Having a problem with your social media content? Too much competition to deal with? Worry not! Here is how a Rephraser can help.

How Automation Software Help with Payroll Processing

Automation software greatly reduces payroll processing errors, enhances compliance, increases efficiency, and makes paychecks easier to create and file. Automation […]

How To Stay Safe While Surfing The Internet

The Internet is a part of our everyday life nowadays. Every day we spend a good amount of time on […]

Business Books Entrepreneurs Must Read to Dominate Their Industry

Whether you aspire to start a small business or launched a digital marketing agency, you must spend sufficient time reading […]

The Creative Entrepreneur: Exploring Career Opportunities for Innovators and Problem-Solvers

All entrepreneurs need problem-solving and innovative skills. Finding solutions or creating new possibilities is accomplished through problem-solving. The ability to […]

Top 2D Animation Tools in 2023

Shopping for 2D animation software for your next project? Here are five of the best 2D Animation tools that are worth exploring.

Is Link Building Essential for WordPress Website

In current digital marketing, inbound link creation directly correlates with online success. Link building is all about gaining inbound connections, […]

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.