Before attempting fixes, it’s crucial to diagnose why Apache WordPress show Not Trusted Certificate. A systematic approach ensures you address the root cause rather than applying a temporary patch.
Step 1: Browser Inspection
Use your browser’s developer tools or SSL warning details to understand the problem:
- Click the padlock or warning symbol.
- Look for messages like:
- “Certificate expired”
- “Self-signed certificate”
- “Certificate does not match the domain”
- Note the issuing authority and certificate validity dates.
Step 2: Online SSL Testing Tools
Tools like SSL Labs’ SSL Test or Why No Padlock provide detailed analysis:
- Check the certificate chain.
- Identify missing intermediates.
- Detects unsupported encryption algorithms.
- Validate browser trust across platforms.
Step 3: Apache SSL Configuration Check
SSH into your server and examine Apache’s SSL configuration files (usually ssl.conf, httpd.conf, or virtual host files):
Confirm the certificate path:
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/example.com.key
SSLCertificateChainFile /etc/ssl/certs/intermediate.crt
Check for syntax errors:
apachectl configtest
Reload Apache to apply changes:
systemctl reload apache2
Step 4: WordPress Configuration Validation
- Ensure both WordPress Address (URL) and Site Address (URL) are set to https://.
Inspect .htaccess rules for HTTPS redirects:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- Disable conflicting plugins temporarily to isolate SSL-related issues.
Pro Tip: Keep a backup of .htaccess and configuration files before making changes.
Leave a Reply