How to Fix SSL Errors in WordPress
"Your connection is not private" and "too many redirects" look different but come from a short list of causes. Find the message you see in the table below, then jump to that fix.
| What you see | Cause | Go to |
|---|---|---|
| Certificate error, name mismatch or expired | Server certificate problem | Fix 1 |
| ERR_TOO_MANY_REDIRECTS | Redirect loop | Fix 2 |
| Padlock with warning, broken images | Mixed content | Fix 3 |
| Locked out of wp-admin after URL change | Wrong site URL | Fix 4 |
Fix SSL errors in WordPress: certificate errors
This is not a WordPress problem. The server presents a bad certificate. Run the domain through our SSL checker and read the result.
- Expired: renewal failed. Rerun it in your host panel.
- Name mismatch: the certificate does not cover the name you visit, often
wwwversus the root. Reissue with both names. - Incomplete chain: install the intermediate certificate. Our key pair matcher guide helps confirm you installed the right files.
Fix 2: Redirect loops
A loop means two rules fight. Typical pairs are a plugin redirect plus a server redirect, or a CDN sending http to the origin while WordPress forces https. If TLS ends at a proxy, tell WordPress the original request was secure. Add this to wp-config.php above the stop-editing line:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
&& $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
Then keep only one redirect source. Disable the plugin redirect or the server rule, not both. Background on proxies is in this reverse proxy guide.
If you use a CDN with a "flexible" mode, switch to a mode where the origin also uses https, which stops the origin from looking insecure to WordPress.
Fix SSL errors in WordPress: mixed content
The page loads over https but pulls something over http. Open the browser Console, find the blocked URLs, and replace them. A bulk fix with WP-CLI:
wp search-replace "http://example.com" "https://example.com" \
--dry-run
Remove --dry-run after checking the count, and clear every cache. Builder and WooCommerce cases are covered in our mixed content guide.
Fix 4: Locked out after changing the URL
If you set an https URL before the certificate worked, you may not reach the login page. Override the values in wp-config.php, which takes priority over the database:
define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');
Log in, fix the certificate, then switch them back to https. Another route is editing the siteurl and home rows of the options table in your database tool.
Fix 5: Plugin or theme conflicts
If the fixes above change nothing, rename the wp-content/plugins folder over FTP to disable all plugins, then test. Add plugins back one at a time. Security and caching plugins are the most frequent cause.
After the fix
- Test in a private window so cached redirects do not mislead you.
- Check the homepage, a post, the login page and checkout if you sell.
- Confirm the certificate with the checker.
- Make sure only one place forces https.
For a clean first-time setup, follow the full process in our guide on getting free SSL for WordPress.
Reading the browser message
Browsers give different codes for different faults. Names such as NET::ERR_CERT_DATE_INVALID point to expiry, and NET::ERR_CERT_COMMON_NAME_INVALID points to a name mismatch. Both are server-side. A message about "not fully secure" with a padlock points to mixed content. Matching the message to the cause first saves hours of changing settings that were never the problem.
What to send your host
If you need support, include the exact error code, the domain, the time it started and what you changed just before. Add the output of the SSL checker. Hosts can act quickly on that and slowly on "SSL is broken".
Never edit the certificate or key files yourself unless you know which pair belongs together. A mismatch makes things worse.
Related reading: forcing HTTPS in WordPress and mixed content in WordPress.
Frequently Asked Questions
Why does the error appear only for some visitors?
Cached redirects, an old DNS answer or a CDN edge that still serves an old certificate can all differ by visitor. Test from a second network and a private window.
Why does the admin lock me out after I change the site URL?
Because the login cookie is tied to the address you changed. Set WP_HOME and WP_SITEURL in wp-config, or edit the two rows in the options table, then sign in again at the new address.
Should I use a plugin to fix mixed content?
As a stopgap only. A plugin that rewrites output hides the http URLs instead of fixing them, and it can break the editor. Find the source: a theme option, a widget, a builder template or a hard coded link.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.