{"id":2845,"date":"2020-02-27T18:41:09","date_gmt":"2020-02-27T18:41:09","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=ht_kb&#038;p=2845"},"modified":"2022-04-13T10:46:19","modified_gmt":"2022-04-13T10:46:19","slug":"fix-mixed-content-warnings","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/fix-mixed-content-warnings\/","title":{"rendered":"How to Quickly Fix SSL Mixed Content Warnings on Your Website"},"content":{"rendered":"<h3 id=\"what-is-ssl-mixed-content\" class=\"LC20lb DKV0Md\">What Is SSL Mixed Content?<\/h3>\n<p><strong>SSL mixed content<\/strong> occurs when your site is loaded over a secure HTTPS connection, but other resources on your site (such as images, icons, videos, CSS, or JavaScript) are loaded over an insecure HTTP connection at the same time.<\/p>\n<p>This is called mixed content because both HTTP and HTTPS resources are being used to display the same page at the same time, but the initial request was secure over HTTPS protocol. As a result, the major web browsers will display warnings about this type of content to indicate that the page you are accessing contains insecure resources.<\/p>\n<p>In other words, these warnings may cause your website visitors to question the security between your website and their computer. You can prevent this issue from occurring by configuring your site to only serve secure content.<\/p>\n<h3 id=\"what-causes-mixed-content-warnings\" class=\"has-anchor-hash\">What Causes Mixed Content Warnings?<span id=\"what-causes-mixed-content-warning\" class=\"anchor-hash\" aria-hidden=\"true\"><\/span><\/h3>\n<p>Mixed content warnings usually appear once you have forced a redirect from HTTP to HTTPS for your site.<\/p>\n<p>In addition, here are some other cases of what might cause a warning:<\/p>\n<ul>\n<li>Web developers sometimes use absolute paths (<code>http:\/\/domain\/style.css<\/code>) in the site&#8217;s code to link to resources like CSS and JavaScript instead of using relative paths (<code>\/style.css<\/code>).<\/li>\n<li>Images have hardcoded URLs (<code>http:\/\/domain.com\/image.png<\/code>) that point to HTTP.<\/li>\n<li>You are using HTTP versions of external scripts. (Hosted jQuery, Font Awesome, etc.)<\/li>\n<li>You are using embedded video scripts using HTTP instead of HTTPS.<\/li>\n<\/ul>\n<h3 id=\"how-to-find-mixed-content\">How to Find Mixed Content?<\/h3>\n<p>An easy to use online resource for finding mixed content on your site&#8217;s page is <a href=\"https:\/\/www.whynopadlock.com\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Why No Padlock<\/a>?<\/p>\n<p>You will just have to enter the URL of the page where you are receiving mixed content warnings and Why No Padlock will automatically scan for mixed content.<\/p>\n<h3 id=\"how-to-fix-mixed-content-warnings\" class=\"has-anchor-hash\">How to Fix Mixed Content Warnings<\/h3>\n<p>Follow the simple steps below to fix SSL mixed content warnings. This assumes you have already done the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/chemicloud.com\/kb\/article\/how-to-install-lets-encrypt-ssl\/\" target=\"_blank\" rel=\"noopener noreferrer\">Installed a free Let&#8217;s Encrypt SSL certificate<\/a><\/li>\n<li><a href=\"https:\/\/chemicloud.com\/kb\/article\/redirect-http-to-https\/\" target=\"_blank\" rel=\"noopener noreferrer\">Forced a redirect from HTTP to HTTPS<\/a><\/li>\n<\/ul>\n<p>&#8220;Upgrade Insecure Requests&#8221; is a\u00a0<a href=\"https:\/\/www.w3.org\/TR\/CSP\/#content_security_policy\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">CSP (Content Security Policy)<\/a> directive that allows you to tell to a web browser that all the resources on your website must be accessed via HTTPS.<\/p>\n<p><b>Struggling with security issues? ChemiCloud is the hosting solution designed with reliability and security in mind! \ud83d\udd10 Check out our <\/b><span style=\"text-decoration: underline;\"><a href=\"https:\/\/chemicloud.com\/pricing#60b65e4e63b58\" target=\"_blank\" rel=\"noopener\"><span class=\"s1\"><b>web hosting <\/b><\/span><\/a><\/span><b>plans!<\/b><\/p>\n<p>Your resources will automatically be requested on HTTPS by the client\/browser, without any mixed content warning.<\/p>\n<p>Upgrade Insecure Requests is supported by Mozilla Firefox, Google Chrome, Microsoft Edge, Opera, Android, Chrome for Android, Safari.<\/p>\n<p>To implement this, you only need to add the following lines of code to your site&#8217;s .htaccess file:<\/p>\n<pre># BEGIN Fix SSL Mixed Content Warnings\r\n&lt;ifModule mod_headers.c&gt;\r\nHeader always set Content-Security-Policy \"upgrade-insecure-requests;\"\r\n&lt;\/IfModule&gt;\r\n# END Fix SSL Mixed Content Warnings<\/pre>\n<p>Now let\u2019s go back and access your website. Notice how it redirects us to the secure version, and we see a secure lock symbol in the location bar.<\/p>\n<p>That means we\u2019re using a secure connection to the site and that all the resources on the site are loaded over https.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What Is SSL Mixed Content? SSL mixed content occurs when your site is loaded over a secure HTTPS connection, but other resources on your site (such as images, icons, videos, CSS, or JavaScript) are loaded over an insecure HTTP connection at the same time. This is called mixed content because&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[192],"ht-kb-tag":[],"class_list":["post-2845","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-website-security"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=2845"}],"version-history":[{"count":8,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2845\/revisions"}],"predecessor-version":[{"id":7379,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2845\/revisions\/7379"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=2845"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=2845"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=2845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}