RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursitedomain.com/$1 [R,L]
Once you've saved this change, anyone who visits your site via HTTP will be redirected to HTTPS.
The first problem you encounter after setting up HTTPS on the web is that many images on the page are broken.
This problem occurs when all images are provided through unsafe CDN links. Because your traffic is redirected to use HTTPS, these images cannot be downloaded.
There are two ways to fix this error. The easiest method is to edit the SSL certificate to be able to use wildcards. For example, if you use Let's Encrypt, you will see the option to use the characters in the SSL management page.
The wildcard allows you to use your SSL certificate on any of the site's subdomains. Enable this feature and get CA-encoded certificates, keys, and text packages from SSL information.
Access the CDB service to paste the SSL certificate and the Private Key into the corresponding fields.
Use the encrypted text you pasted into cPanel in the previous step.
After saving, all photos will be downloaded on your site.
If the SSL service you use does not provide a wildcard option, you need to purchase a second SSL certificate for the CDN image and install it according to the steps above.
If you haven't done anything except to enable SSL and HTTPS certificates, you'll see a 'Not Secure' error. This error is still displayed when you download the page via HTTPS. The common cause of this error is because you still have unsafe links on the page such as links in the sidebar, header or footer.
Access to WordPress and see header and footer codes as well as sidebar widgets. Also check out the links to services like Gravatar, Facebook and other services.
Change these links to use HTTPS instead of HTTP. Once completed, delete all cache and reload the page. All problems are solved and your site is safer.
I wish you all success!
See more: