Mixed Content Page: requested an insecure stylesheet error

Experienced similar error in Drupal 8.0.1

Error - Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure stylesheet ''. This request has been blocked; the content must be served over HTTPS.

Solution - Open .htaccess file and add the following line Header always set Content-Security-Policy "upgrade-insecure-requests;"


Most probably inside your html code you have something like

<link href="http://someSite.com/css/someStyle.css" rel="stylesheet" type="text/css" />

you should change this to

<link href="https://someSite.com/css/someStyle.css" rel="stylesheet" type="text/css" />

also the page you are referring to is .html not css, but i guess that is a typo ...


If you are able to serve CSS etc over HTTPS, the best solution is to use // as the scheme for asset URLs.

That means "use the same scheme (sometimes called protocol) as the parent document", i.e. use https if the page uses https. For example:

<link rel="stylesheet" href="//mysite.com/styles.css">
<script src="//mysite.com/app.js"></script>

Here's your problem:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) http://www.example.com/$1 

You don't allow SSL requests (443 port number is used for HTTPS requests). Try removing these lines.