Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    How to Force HTTPS and Fix Mixed Content Errors in Plesk (Complete Guide)

    Priya

    Content Writer & Researcher

    Last Updated: 22 July 2026
    🖥️

    Stop Losing Visitors to SSL Mixed Content Warnings Today

    CloudHouse's server management team handles HTTPS migrations, Plesk SSL configurations, and mixed content audits for hosting companies — so your sites load clean and secure. Get your setup reviewed before the next Google crawl.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    If you've just installed an SSL certificate in Plesk and your site is still throwing browser warnings, you're dealing with one of the most frustrating post-SSL problems in web hosting — mixed content errors. The plesk force https mixed content fix isn't a single switch; it's a layered process that covers your Plesk panel settings, your web server configuration, your CMS, and your HTTP response headers. This guide walks you through every layer so your site loads fully over HTTPS with zero insecure warnings.

    Why Mixed Content Errors Appear After Enabling SSL in Plesk

    When a browser loads a page over HTTPS, every resource that page requests — images, scripts, stylesheets, fonts, iframes, WebSocket connections — must also come over HTTPS. If even one resource is requested over plain HTTP, the browser flags it as mixed content.

    There are two categories:

    • Passive mixed content — images, audio, video loaded over HTTP. The browser usually displays the page but shows a warning badge in the address bar.
    • Active mixed content — scripts, stylesheets, iframes, XHR/fetch calls over HTTP. The browser blocks these outright, breaking layouts and functionality.

    Why does this happen right after enabling SSL in Plesk? Because Plesk's built-in HTTPS redirect only controls how the page URL is delivered — it does nothing about hard-coded http:// URLs inside your HTML, your database, your theme files, or your application config. Those insecure references were written before SSL existed on the domain, and they stay insecure until you fix each layer explicitly.

    Common root causes include:

    • Hard-coded http:// URLs in HTML, CSS, or JavaScript files
    • WordPress database entries storing the old HTTP site URL
    • Third-party scripts or ad networks serving assets over HTTP
    • WebSocket connections using ws:// instead of wss://
    • Reverse proxy configurations that strip or ignore the X-Forwarded-Proto header

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 1: Enable and Force HTTPS Redirect in Plesk Panel

    1Turn on the Plesk HTTPS redirect toggle

    Log into Plesk and navigate to Websites & Domains. Click on the domain you want to secure, then select Hosting Settings. Under the Security section, enable Permanent SEO-safe 301 redirect from HTTP to HTTPS and click OK. Plesk writes the redirect rule into your Apache or Nginx virtual host configuration automatically.

    2Verify the redirect is live

    From the command line, run a quick curl test:

    curl -I http://yourdomain.com

    You should see HTTP/1.1 301 Moved Permanently and a Location: https://yourdomain.com/ header. If you see a redirect loop (301 → 301 → 301), check whether your site is behind Cloudflare or a load balancer that is already terminating SSL — in that case, disable the Plesk toggle and handle the redirect at the proxy level instead.

    3Check for conflicting .htaccess rules

    If a previous developer added manual redirect rules to .htaccess, they may conflict with the Plesk-generated rule. Open /var/www/vhosts/yourdomain.com/httpdocs/.htaccess and remove any duplicate RewriteRule blocks that reference HTTP-to-HTTPS redirects, keeping only the one Plesk manages.

    1Open Chrome DevTools Console

    Load your site over HTTPS, open DevTools (F12), and click the Console tab. Mixed content warnings appear as red or yellow messages prefixed with Mixed Content:. Each message shows the exact URL of the insecure resource.

    2Use the Network tab to filter by HTTP

    In the Network tab, reload the page and use the search bar to filter by http://. This reveals every resource request that isn't using HTTPS, including lazily-loaded images and background XHR calls that may not appear in the Console.

    3Check for WebSocket mixed content

    If your application uses real-time features (live chat, push notifications, collaborative editing), look for ws:// connections in the Network tab under the WS filter. These must be upgraded to wss:// in your application code — no server-side header can fix a hard-coded WebSocket URL.

    4Run an automated scan

    For large sites, the manual approach misses dynamically-loaded content. Use Why No Padlock or the open-source mixed-content-scan CLI tool to crawl every page:

    npx mixed-content-scan https://yourdomain.com --format=text
    1Update WordPress Site URL settings

    In the WordPress admin, go to Settings → General and change both WordPress Address (URL) and Site Address (URL) from http:// to https://. Save changes.

    2Run a database search-and-replace

    Install the Better Search Replace plugin or use WP-CLI from the Plesk terminal:

    wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables --path=/var/www/vhosts/yourdomain.com/httpdocs

    This updates every stored URL in your posts, postmeta, options, and custom tables in a single pass. Always take a database backup before running this command.

    3Add HTTPS enforcement to wp-config.php

    Open wp-config.php and add these lines above the /* That's all, stop editing! */ comment:

    define('FORCE_SSL_ADMIN', true);
    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
        $_SERVER['HTTPS'] = 'on';
    }

    The second block is essential when WordPress runs behind Plesk's Nginx proxy — without it, WordPress doesn't know the connection is HTTPS and may generate HTTP URLs for enqueued scripts.

    4Flush WordPress caches

    If you use a caching plugin (WP Super Cache, W3 Total Cache, WP Rocket), purge the entire cache after making these changes. Cached pages may still contain old HTTP URLs.

    Step 5: Use Content-Security-Policy Headers to Upgrade Insecure Requests

    Once you've fixed all known mixed content sources, add a Content-Security-Policy header with the upgrade-insecure-requests directive as a safety net. This instructs the browser to automatically upgrade any remaining http:// resource requests to https:// before making the connection — catching any hard-coded URLs you missed.

    Adding CSP Header in Apache .htaccess

    <IfModule mod_headers.c>
        Header always set Content-Security-Policy "upgrade-insecure-requests"
    </IfModule>

    Adding CSP Header in Nginx (Plesk Additional Directives)

    add_header Content-Security-Policy "upgrade-insecure-requests" always;

    Adding CSP Header in WordPress

    Add this snippet to your theme's functions.php or a site-specific plugin:

    add_action('send_headers', function() {
        header("Content-Security-Policy: upgrade-insecure-requests");
    });

    Important: upgrade-insecure-requests only handles passive and active HTTP resource loads. It does not upgrade WebSocket connections (ws:// to wss://). Those must be fixed in application code. Also note that this directive does not work as a substitute for fixing your database URLs — it is a browser-side last-resort upgrade, not a server-side rewrite.

    Verifying Your CSP Header

    After deploying, verify the header is being sent:

    curl -I https://yourdomain.com | grep -i content-security-policy

    You should see: content-security-policy: upgrade-insecure-requests

    For complex server environments, ongoing SSL management, and HTTPS migration across multi-domain Plesk setups, the team at CloudHouse server management provides hands-on support so you don't have to debug vhost configurations alone.

    FAQs

    Why is my Plesk HTTPS redirect causing a redirect loop?

    A redirect loop usually means your site is behind Cloudflare or a load balancer that is already terminating SSL and forwarding traffic to Plesk over plain HTTP. Plesk sees incoming HTTP traffic and redirects to HTTPS, but the proxy sends it back as HTTP again — infinite loop. The fix is to either disable the Plesk redirect toggle and let the proxy handle it, or add a condition to the redirect rule that checks the X-Forwarded-Proto header and skips the redirect if it equals https.

    How do I find all mixed content on a large WordPress site in Plesk?

    Use WP-CLI's search command combined with a crawler tool. First run wp search-replace --dry-run 'http://yourdomain.com' 'https://yourdomain.com' --all-tables to see how many records contain HTTP URLs. Then use the mixed-content-scan NPM package or Why No Padlock to crawl all pages and identify dynamically-generated insecure references that the database replace won't catch.

    Does the Plesk SSL redirect toggle work with Nginx or only Apache?

    The Plesk redirect toggle writes rules for both Apache and Nginx automatically, depending on which web server handles your domain. For domains served by Nginx (Plesk's default since Plesk Onyx), the toggle writes an Nginx return 301 directive in the vhost config. For Apache-only domains, it writes an .htaccess rewrite rule. You can verify which server is active under Websites & Domains → Apache & nginx Settings.

    What is the difference between mixed content warnings and blocked mixed content?

    Passive mixed content (images, audio, video loaded over HTTP) produces a warning — the browser shows the page with a degraded padlock icon. Active mixed content (scripts, stylesheets, XHR, iframes over HTTP) is blocked — the browser refuses to load those resources entirely, which can break your site layout, JavaScript functionality, and login sessions. The upgrade-insecure-requests CSP directive handles both, but active mixed content blocked errors are the more urgent priority.

    Will fixing mixed content in Plesk improve my Google Search rankings?

    Yes, indirectly. Google has confirmed HTTPS is a ranking signal, and a site with mixed content warnings is technically still serving insecure content even though the page URL is HTTPS. More directly, a padlock warning in the Chrome address bar increases visitor bounce rates — users who see security warnings leave. Fixing mixed content removes those warnings, improves user trust signals, and ensures Google's crawler can access all page resources without blockage, which can positively affect crawl quality scores.

    Forcing HTTPS and eliminating mixed content in Plesk requires working through four distinct layers: the panel redirect toggle, your Apache or Nginx virtual host configuration, your CMS database and application settings, and your HTTP response headers. The Plesk toggle is only the starting point — the database URLs, the wp-config.php proxy flags, and the CSP upgrade-insecure-requests header are what actually close the gaps that leave browsers unhappy. Work through each step in order, verify with DevTools and curl after each change, and you'll have a clean, fully-green HTTPS padlock with no mixed content warnings remaining.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    A redirect loop usually means your site is behind Cloudflare or a load balancer that is already terminating SSL and forwarding traffic to Plesk over plain HTTP. Plesk sees incoming HTTP traffic and redirects to HTTPS, but the proxy sends it back as HTTP again. The fix is to either disable the Plesk redirect toggle and let the proxy handle it, or add a condition to the redirect rule that checks the X-Forwarded-Proto header and skips the redirect if it equals https.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Struggling With HTTPS Mixed Content in Plesk?

    Mixed content errors don't always have an obvious fix — they hide in databases, theme files, and proxy configurations that the Plesk toggle can't touch. Our engineers have resolved hundreds of post-SSL Plesk migrations and know exactly where to look. Reach out to CloudHouse for a fast, thorough HTTPS audit.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top