preloader

How To Force SSL With HTACCESS & Meta Tags To Fix Mixed Content

So, you have a shiny new SSL certificate for your website and now need to force SSL but you keep getting mixed content errors.

This simple tutorial will consist of two parts and should get you up and running with a “green lock” in no time.

First, you need to modify your .htaccess file by inserting the below code:

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

Next, you will want to insert the following code into the “meta” section of your site header.

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

 

That should cover it, if you have any trouble please feel free to reach out to us.

Mike Danna has maintained sole ownership of Vessio for more than 12 years actively leading advanced services and communications for our clients. Want to work with us? View our pricing.

Write a comment

x

Use Code WINTER For 65% Off Your First Month - View Pricing