How to Force HTTPS and Fix Mixed Content Print

  • 0

After your SSL certificate is installed, make sure every visitor uses the secure https:// version of your website.

Option 1 – cPanel Force HTTPS Redirect

  1. In cPanel open Domains → Domains.
  2. Turn on Force HTTPS Redirect for your domain.

Option 2 – .htaccess redirect

Add these lines at the top of the .htaccess file in public_html:

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

WordPress websites

  1. Go to Settings → General and change both WordPress Address and Site Address to start with https://.
  2. Fix old http:// links in posts and images: use a search-and-replace plugin (e.g. Better Search Replace) to replace http://yourdomain.com with https://yourdomain.com, or use the Really Simple SSL plugin.
  3. Clear any caching plugin and your browser cache.

What is “mixed content”?

If the padlock is missing or shows a warning, some images, scripts or stylesheets are still loading over http://. In Chrome press F12 → Console to see which files are insecure and update their links to https://.

Hosting with us? Open a ticket and we will set up the redirect and fix mixed content for you.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution