How to troubleshoot WordPress SSL certificate issues?
Answer
Troubleshooting WordPress SSL certificate issues requires a systematic approach to identify and resolve common problems that prevent secure HTTPS connections. SSL (Secure Sockets Layer) errors typically manifest as browser warnings like "Your connection is not secure" or specific error codes such as NET::ERRCERTCOMMONNAMEINVALID or NET::ERRCERTINVALID. These issues often stem from misconfigured settings, expired certificates, mixed content (HTTP/HTTPS conflicts), or incorrect redirects. The most critical first step is verifying your WordPress site’s URL settings in Settings > General, ensuring both the WordPress Address and Site Address use https:// instead of http:// [1]. If these are incorrect, browsers will flag the site as insecure even if the SSL certificate is valid.
Intermittent SSL errors—where some users see warnings while others don’t—often indicate mixed content problems, where certain resources (images, scripts, or stylesheets) load over HTTP instead of HTTPS [2]. Other frequent causes include:
- Expired or improperly installed certificates, which require reinstallation or validation through tools like SSL Labs [4].
- Too many redirects, typically caused by conflicting HTTPS enforcement rules in
.htaccessorwp-config.php[5]. - Domain name mismatches in the certificate, which may require reissuing the certificate with the correct domain [6].
- Hosting provider conflicts, such as AutoSSL overwriting manual certificates, necessitating support intervention [6].
For most users, resolving these issues involves a combination of updating WordPress settings, configuring redirects, and using plugins like Really Simple SSL to automate fixes for mixed content [2][4]. Advanced cases may require manual edits to .htaccess or wp-config.php, or even contacting your hosting provider to disable conflicting SSL services like cPanel’s AutoSSL [6].
Step-by-Step SSL Troubleshooting for WordPress
1. Verify and Correct WordPress Core Settings
The foundation of SSL troubleshooting begins with ensuring WordPress itself is configured to use HTTPS. Even with a valid certificate, incorrect settings in the WordPress dashboard will trigger security warnings.
Start by navigating to Settings > General in your WordPress admin panel. Check both the WordPress Address (URL) and Site Address (URL) fields:
- If either field begins with
http://, change it tohttps://and save the changes [1][8]. - Failing to update these fields is a leading cause of intermittent SSL errors, as WordPress will generate insecure links for assets and pages [4].
After updating, clear your browser cache and test the site. If you encounter a "Too Many Redirects" error, this indicates a conflict between WordPress and server-level HTTPS enforcement. To resolve this:
- Open your
wp-config.phpfile via SFTP or your hosting file manager. - Add the following lines above the
/ That's all, stop editing! /line:
define('FORCESSLADMIN', true);
define('FORCE_SSL', true);
This forces WordPress to use HTTPS for all admin and front-end pages [5].
If the issue persists, check your .htaccess file for conflicting redirect rules. A proper HTTP-to-HTTPS redirect should include:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTPHOST}%{REQUESTURI} [L,R=301]
Incorrect or duplicate rules here can create redirect loops [2].
2. Diagnose and Fix Mixed Content Errors
Mixed content errors occur when a page loads over HTTPS, but certain resources (images, scripts, or iframes) are still served via HTTP. Browsers flag these as security risks, displaying warnings like "This page includes other resources which are not secure" [2][9].
To identify mixed content:
- Use your browser’s Developer Tools (F12) and check the Console tab for warnings about insecure resources [4].
- Online tools like Why No Padlock? can scan your site and list all HTTP resources [9].
Solutions for mixed content:
- Plugin-based fix: Install Really Simple SSL (free), which automatically detects and rewrites HTTP URLs to HTTPS. The plugin also includes a mixed content scanner [2][4].
- Manual database update: If plugins fail, use a tool like Better Search Replace to replace all
http://yourdomain.cominstances withhttps://yourdomain.comin your database. Always back up your database first [8]. - Hardcoded URLs: Some themes or plugins hardcode HTTP URLs. Check your theme’s
functions.phpor plugin files for absolute HTTP links and update them [5].
For cURL error 60 (local issuer certificate issues), which indicates a problem with the certificate chain:
- Ensure your hosting provider has installed the intermediate/chain certificate alongside your primary SSL certificate [7].
- If using a custom certificate, verify the
ca-bundle.crtfile is correctly referenced in your server configuration [7].
Advanced cases:
- If mixed content persists after plugin fixes, inspect your site’s source code (Ctrl+U) for hardcoded HTTP links in scripts or stylesheets.
- Some CDNs or external services (e.g., Google Fonts) may default to HTTP. Configure these to use HTTPS explicitly [9].
3. Resolve Certificate-Specific Errors
SSL certificate errors like NET::ERRCERTINVALID or NET::ERRCERTCOMMONNAMEINVALID require direct intervention with the certificate itself. These errors typically stem from:
- Expired certificates: Check validity using SSL Checker. If expired, reinstall or renew through your hosting provider [4].
- Domain mismatches: The certificate’s Common Name (CN) or Subject Alternative Names (SANs) must match your site’s domain exactly. For example, a certificate for
example.comwon’t coverwww.example.comunless SANs are included [1][5]. - Missing intermediate certificates: Some providers require manual installation of chain certificates. Contact your host or use tools like SSL Labs to verify the chain [7].
Steps to reinstall a certificate:
- Delete existing certificates via your hosting control panel (e.g., cPanel’s SSL/TLS section) to avoid conflicts [6].
- Reissue the certificate through your provider (e.g., Let’s Encrypt, GoDaddy, or your host’s AutoSSL).
- Verify installation using:
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com | openssl x509 -noout -dates
This command checks the certificate’s expiry date [6].
For hosting-related conflicts:
- If using cPanel’s AutoSSL, it may overwrite manual certificates. Disable AutoSSL or ask your host to exclude your domain [6].
- Some hosts (e.g., Cloudways, DreamHost) offer one-click SSL reinstalls. Use these before manual interventions [5].
4. Final Checks and Prevention
After applying fixes, perform these validation steps:
- Test in multiple browsers (Chrome, Firefox, Edge) and devices to confirm consistency.
- Clear all caches: Browser cache, WordPress caching plugins (e.g., WP Rocket), and CDN caches (e.g., Cloudflare) [9].
- Update Google Search Console: Submit your HTTPS sitemap and request re-indexing to avoid SEO drops [4].
- Monitor for recurrence: Use tools like UptimeRobot to alert you if SSL issues reappear [2].
Prevent future issues:
- Enable auto-renewal for your SSL certificate (most hosts offer this for Let’s Encrypt) [8].
- Use Really Simple SSL or SSL Insecure Content Fixer plugins to automate mixed content detection [2].
- Regularly audit your site for HTTP links, especially after theme/plugin updates [5].
Sources & References
wpbeginner.com
wp-umbrella.com
dreamhost.com
wordpress.org
forum.infinityfree.com
ipage.com
Discussions
Sign in to join the discussion and share your thoughts
Sign InFAQ-specific discussions coming soon...