Do I need a separate HTACCESS rule to direct HTTP traffic to HTTPS or does wordpress do it own its own?

[ad_1]

Over the years I’ve always been adding the following HTACCESS rule to all my worpress sites to direct any HTTP traffic to HTTPS.

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

It essentially checks if the incoming URL is HTTP and if so rewrites it to HTTPS.

Now I’m wondering if this is really required? Does wordpress redirect to the HTTPS version on its own if we use the HTTPS URL in the settings page?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer