If you find that a redirect to the secure https:// protocol does not occur on the WordPress site, then this article will help you.
You can see this in the developer panel in the browser, in the address bar of the browser, as well as by missing elements on the site. For example, product rating stars may no longer be displayed (instead of them there will be letters SSSSS). Looking at the developer panel, you will find a number of errors while loading fonts.

Solution

The problem of redirection is solved by making changes to the .htaccess file in the root folder of your site on the server.
The lines below should be sure to be at the top in your .htaccess file.

# BEGIN Redirect
RewriteEngine on

# HERE MUST BE REDIRECTION FROM THE HOSTING ADDRESS TO THE DOMAIN NAME

# HERE MUST BE REDIRECTION IN THE NAME WITH www. TO A DOMAIN NAME without www.

# AND THE LINE BELOW ARE JUST RESPONSIBLE FOR REDIRECTION TO https://

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # END Redirect

# END Redirect

Leave a comment

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