Search code examples
wordpress.htaccesssslhttpsssl-certificate

After renewing the SSL certificate the browser keeps displaying an SSL error


After I have renewed the SSL certificate many visitors keep getting the message that there is not a valid certificate.

Question: how can I force the new certificate to be activated on all clients?

It is a WordPress site, I can not restart any services via DirectAdmin.

At the moment I have the following code in my .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-Content-Type-Options "nosniff"
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
Header always set Content-Security-Policy "upgrade-insecure-requests; env=HTTPS"
Header always set Referrer-Policy "same-origin"
Header always set Referrer-Policy "same-origin"
Header always set Feature-Policy "geolocation 'self'; vibrate 'none'"
</IfModule>

Solution

  • If you have not any issues with certificate maybe is just cache of your browser. Try clear data, or open in other device you should be done!

    if you want redirect http connections to https add this following to .htaccess

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{HTTPS} off
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>