Your .htaccess file is located in the root folder of your WordPress installation. Usually, this folder is called public_html.
You need to open this file with the code editor of your choice and add the below code (preferably at the very top).
# Force HTTPS on all pages
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Comments