How to Fix WordPress SSL Errors When Your Hosting Provider Uses a Load Balancer

Fix WordPress SSL errors behind a load balancer by making WordPress trust the original HTTPS request, then use WP Force SSL to force secure URLs, repair mixed content, and test the setup. This issue is common because WordPress powers about 43% of all websites, so many busy sites sit behind proxies, CDNs, or cloud load balancers [source: W3Techs].

TLDR: If your hosting provider uses a load balancer, WordPress may think visitors are using HTTP even when the browser shows HTTPS. That causes redirect loops, “too many redirects,” broken admin logins, or mixed content warnings. For example, a small agency moving 18 client sites to cloud hosting may see SSL trouble on 5 or 6 of them, usually fixed by trusting the X Forwarded Proto header and scanning URLs with WP Force SSL.

Why SSL breaks behind a load balancer

A load balancer sits between the visitor and your WordPress server. The visitor connects with HTTPS. The load balancer may then talk to your server over HTTP. That is normal in many hosting setups.

The problem starts when WordPress only sees the second part of that trip. It thinks the request is plain HTTP. So it tries to “fix” it by redirecting to HTTPS. Then the load balancer sends the request back again. WordPress still thinks it is HTTP. Round and round it goes.

The result is usually one of these annoying errors:

  • ERR_TOO_MANY_REDIRECTS in Chrome.
  • Mixed content warnings in the browser console.
  • Images, CSS, or JavaScript loading over HTTP.
  • WordPress admin login kicking you back to the same page.
  • WooCommerce checkout showing “Not secure.” That one hurts.

Honestly, it feels like the site is gaslighting you. The padlock is there one second. Then one logo file loads over HTTP and ruins the whole page.

Step 1: Check the load balancer headers

Most load balancers send a header that tells WordPress what the original visitor used. The common one is:

X-Forwarded-Proto: https

WordPress needs to trust that header. Some managed hosts already set this for you. Others do not. If you can edit wp-config.php, add this above the line that says “stop editing”:

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

This tells WordPress, “Yes, the original request was secure.” It often stops the redirect loop right away.

If your host uses a different header, ask support for the exact one. Use plain words: “Which HTTPS forwarding header does your load balancer send to PHP?” That saves you from a 14-message support thread that goes nowhere.

Step 2: Install WP Force SSL

Next, install WP Force SSL. It is built for WordPress SSL fixes, and it is useful when a site has half-secure pages, bad internal links, or old HTTP assets hiding in the database.

You can also review the pro features and SSL tools at WP Force SSL. The plugin is helpful because it gives you one place to check SSL status instead of jumping between browser tabs, hosting panels, and database search tools.

After activation, go to the plugin settings and check:

  • SSL certificate status to confirm the certificate is valid.
  • Force SSL so requests are sent to HTTPS.
  • Mixed content scan to find HTTP images, scripts, and styles.
  • Site URL settings to confirm WordPress uses HTTPS.

Step 3: Fix WordPress URLs

Go to Settings > General in WordPress. Check these two fields:

  • WordPress Address URL
  • Site Address URL

Both should start with https://. If they still show http://, update them. If the fields are locked, they may be set inside wp-config.php. Look for lines like:

define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');

Change them to HTTPS. Then clear every cache you have. That means WordPress cache, host cache, CDN cache, and browser cache. It drives me crazy that one old cached redirect can make a fixed site look broken for another 20 minutes.

Step 4: Scan for mixed content

Mixed content means the page is HTTPS, but some files still load over HTTP. Common offenders include logos, background images, fonts, old theme files, analytics scripts, and page builder content.

Use the scan inside WP Force SSL to find these URLs. Then fix them in the media library, theme settings, widgets, menus, or page builder blocks. If there are hundreds, use a tested search-and-replace tool or staging site first. Do not blindly replace database values on a live store at 2 p.m.

Step 5: Test from the outside

Do not only test while logged in. Open a private browser window. Check the homepage, a blog post, the login page, the cart, checkout, and any landing pages.

Look for these signs:

  • The padlock stays visible on every page.
  • No “too many redirects” error appears.
  • CSS and images load normally.
  • Forms submit without warnings.
  • Admin login works on the first try.

If the error returns only on some pages, the load balancer is probably fine. You are likely dealing with mixed content, cached redirects, or hardcoded HTTP links.

When to contact your host

Contact hosting support if WordPress still cannot detect HTTPS after the header fix. Ask them to confirm SSL termination, forwarding headers, and whether HTTPS is passed to PHP. Keep the request short. Include the domain, error message, and a screenshot.

For most sites, the fix is simple: trust the load balancer’s HTTPS header, force secure WordPress URLs, then clean up mixed content with WP Force SSL. Once those three parts line up, the SSL errors usually disappear fast.