Force HTTPS / ssl for my website

if you are using wordpress

Customising Addresses (URLs)

To set the WordPress CMS to HTTPS, you must edit the website’s address setting:

  • Log in to the admin area of your WordPress website and click Settings General on the menu.
  • In the WordPress Address (URL) and Website Address (URL) fields, replace http with https.
  • Click Save Changes.

Force HTTPS for All Visitors

use  301 Redirect to ensure that all HTTP requests are forwarded to the HTTPS website in a search engine friendly way. So links with the “old” HTTP address automatically lead to the HTTPS website.

To set up 301 Redirect, you must access your webspace and insert the following code into the .htaccess file in your WordPress directory:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.YourDomain.com/$1 [R,L]
</IfModule> 
  • IMPORTANT: Replace YourDomain.com with your domain.

Fix a Mixed Content Warning

If browsers still classify your website as insecure after the conversion and display a mixed-content warning in the browser, further action is required.

The Mixed content warning occurs when a website accessed in encrypted form (HTTPS) partially loads unencrypted content through HTTP. This can be the case, for example, with images, audio, or video files loaded from an external webspace or provider.

You may also like...