{"id":1324,"date":"2019-02-08T10:36:10","date_gmt":"2019-02-08T10:36:10","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/2140906-what-to-do-if-a-website-shows-a-mixed-content-warning-in-hostinger\/"},"modified":"2026-03-16T12:12:15","modified_gmt":"2026-03-16T12:12:15","slug":"2140906-what-to-do-if-a-website-shows-a-mixed-content-warning-in-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/2140906-what-to-do-if-a-website-shows-a-mixed-content-warning-in-hostinger\/","title":{"rendered":"What to Do if a Website Shows a Mixed Content Warning in Hostinger"},"content":{"rendered":"<h2 id=\"h_c0f3dc5458\">What is a Mixed Content Warning?<\/h2><p class=\"no-margin\">At Hostinger, all websites hosted on our Web and Cloud Hosting plans include a free SSL that is installed and enforced automatically &ndash; that is, the connection is set to go through HTTPS instead of HTTP. <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">If the website contains elements that are still loaded over an HTTP connection, a mixed content warning will appear. You can check it from your <a href=\"\/support\/2152545-how-to-inspect-website-elements\" target=\"_blank\" class=\"intercom-content-link\">browser console<\/a>:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/8af7eec8-dcd8-412a-afa4-88c8b79d4638.jpg\" alt=\"Mixed content warning from the browser console\"><\/div><p class=\"no-margin\">\n<\/p><h2 id=\"h_c819847469\">How to Fix a Mixed Content Warning<\/h2><p class=\"no-margin\">We have prepared detailed guides<b> <\/b>on how to fix the mixed content error for the most popular CMS. You can find them here:<\/p><ul>\n<li>\n<p class=\"no-margin\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/fix-mixed-content-wordpress\" target=\"_blank\" class=\"intercom-content-link\">WordPress<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><a href=\"\/support\/4468940-how-to-fix-mixed-content-error-in-joomla\" target=\"_blank\" class=\"intercom-content-link\">Joomla<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><a href=\"\/support\/4468956-how-to-fix-mixed-content-error-in-opencart\" target=\"_blank\" class=\"intercom-content-link\">OpenCart<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><a href=\"\/support\/4468993-how-to-fix-mixed-content-error-in-prestashop\" target=\"_blank\" class=\"intercom-content-link\">PrestaShop<\/a><\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">If you are using a different CMS or have a custom-coded website, proceed with the steps below.<\/p><p class=\"no-margin\">\n<\/p><h3 id=\"h_e2a49cf6f6\">Step 1 &ndash; Check the Configuration File<\/h3><p class=\"no-margin\">If your website has a configuration file, start there &ndash; your website&rsquo;s URLs (or default content URLs) may be added there using the HTTP protocol: <\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/4b0d6cb1-9195-4f10-bd8e-c0669f8db527.jpg\" alt=\"The configuration file of a website showing http being used instead of https on the default content URL\"><\/div><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">In that case, you will only need to replace <b>http<\/b> with <b>https<\/b>.<\/p><p class=\"no-margin\">\n<\/p><h3 id=\"h_3aa450a9f4\">Step 2 &ndash; Check the Source Code File<\/h3><p class=\"no-margin\">If you are a website developer, and the mixed content issue is visible on <b>specific pages <\/b>only, the <b><a href=\"https:\/\/www.whynopadlock.com\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Why No Padlock<\/a><\/b> tool can help you easily detect which pages have mixed content issues.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Once you have found the page, open the page file using the File Manager and search for &ldquo;<b>http:\/\/<\/b>&rdquo;, the result may be a link on your code without HTTPS:<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Before replacing<b> http with https<\/b> for these URLs, make sure that the content is available using a secured connection &ndash; open the URL and change HTTP to HTTPS in the browser address bar:<\/p><ul>\n<li>\n<p class=\"no-margin\">If the <b>content is available<\/b> &ndash; you can safely update the URL on your source file.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">If the <b>content is not available<\/b>, you can either replace it with another content available via HTTPS or host the content directly on your website. Alternatively, you can remove the content.<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">\n<\/p><h3 id=\"h_c77eccc632\">Step 3 &ndash; Add a Redirect Rule to .htaccess<\/h3><p class=\"no-margin\">If the error persists after checking the configuration file and source code, you can add the following code to your website&rsquo;s <a href=\"https:\/\/www.hostinger.com\/tutorials\/ssl\/force-https-using-htaccess\" target=\"_blank\" class=\"intercom-content-link\">.htaccess file<\/a>:<\/p><pre><code>Header always set Content-Security-Policy: upgrade-insecure-requests<\/code><\/pre><p class=\"no-margin\">Save the changes and visit your website from an incognito window &ndash; it should load fully secured.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTES<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">This option is <b>not recommended<\/b> if your website uses symlinks.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">If your website does not have an .htaccess file, you can <a href=\"\/support\/1583307-how-to-create-an-htaccess-file\" target=\"_blank\" class=\"intercom-content-link\">create it<\/a>.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Fixing SSL mixed content warning<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[214],"tags":[],"class_list":["post-1324","post","type-post","status-publish","format-standard","hentry","category-mixed-content"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/2140906-what-to-do-if-a-website-shows-a-mixed-content-warning-in-hostinger\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/2140906-que-hacer-si-su-sitio-web-muestra-una-advertencia-de-contenido-no-seguro-mixto-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/2140906-que-faire-si-votre-site-web-affiche-un-avertissement-de-contenu-non-securise-mixte-chez-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/2140906-mengapa-situs-menampilkan-not-secure-apa-yang-dimaksud-peringatan-konten-campuran-di-hostinger\/","default":0},{"locale":"lt-LT","link":"https:\/\/www.hostinger.com\/lt\/support\/2140906-ka-daryti-gavus-pranesima-kad-svetaine-yra-nesaugi-arba-joje-yra-misraus-turinio-hostinger\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/2140906-o-que-fazer-se-o-seu-site-mostrar-um-aviso-de-conteudo-misto-nao-seguro-no-hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1324"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1324\/revisions"}],"predecessor-version":[{"id":5045,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1324\/revisions\/5045"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}