• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue HTTPS problem with www domains

Hi Felix90,

pls. consider to explain to the Plesk Community, WHAT you did and HOW you did it, so people willing to help you have something to investigate to suggest solutions and work-arounds, based on your facts. At the moment, we can only suggest to read again:




If you still experience the described issues, you might consider to use the Plesk Repair Utility ( => Plesk Repair Utility ), with which you have to option to repair webserver configuration files in case of issues/errors/problems:

Example command:
Code:
plesk repair web yourdomain.com -y -v
 
OK thanks. I will be gone till sunday evening. Will provide all informations as soon as I get back!
 
Ok so lets start it here.

the issue is that if I try to access www.nck.de or any subpage it give me an error with the certificate. which is normal, since the certificate does not work with www.nck.de only with nck.de non-www version. so I need to redirect EVERY request from www.nck.de to nck.de, so it does not resolve https://www.nck.de, since that version does not work.

I have an SSL certificate valid for nck.de without the www. I do use wordpress and its set to use the non-www version of my page. the server is centOS and runs the newest PLESK version. I set the domain nck.de to non-www there as well, so its the same as in wordpress settings.

I have tried various htaccess and ngix solutions I have found on different forums, but non worked so far.

my htaccess and ngix are reset now to standard.

current htaccess content is:


# BEGIN rlrssslReallySimpleSSL rsssl_version[2.5.20]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# BEGIN MainWP
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-content/plugins/mainwp-child/(.*)$ /wp-content/plugins/THIS_PLUGIN_DOES_NOT_EXIST [QSA,L]
</IfModule>

# END MainWP
 
Hi Felix90,

the fastest ( and most recommend ) solution would be to use a Let's Encrypt certificate for "nck.de" and "www.nck.de". ;)


Pls. consider to change the domain - specific hosting settings at => HOME > Domains > nck.de > Hosting Settings > ( option ) Preferred domain . You have three options here:
You should consider to remove all ( manual ) additional inserted redirects and choose the option "nck.de". This will place a SEO-safe redirect into your webserver - configuration files.

Afterwards, you would choose the option "SSL/TLS support" and you would as well choose "Permanent SEO-safe 301 redirect from HTTP to HTTPS" with the correct choosen certificate, valid for "nck.de".


If you experience issues with the above settings, pls. consider to repair the existent webserver configurations files with the Plesk Repair Utility ( => Plesk Repair Utility: Web ) and the example command ( logged in as user "root" over SSH ):
Code:
plesk repair web nck.de -y -v


Pls. make sure to add your ( actual ) configuration files as attachment for further investigations ( => /var/www/vhosts/system/nck.de/conf ) and don't forget to add the corresponding WordPress - configuration file "wp-config.php" ( pls. leave out sensitive informations like "DB_NAME", "DB_USER", "DB_PASSWORD" and "Keys and Salts" ) and add ( possible ) current ".htaccess" - files, in case that you experience further issues/errors/problems.

In addition, pls. share your informations about your current used webserver configuration ( apache or apache+nginx? / which PHP version? / which PHP - handler? ), because the more information you provide, the better will be ( possible ) suggestions. :)
 
Back
Top