• 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

Apache sends wrong certificate.

Oswald

New Pleskian
Apache sends wrong certificate

I have two domains in two webspaces: example.org and example.net.

When I visit https://example.org, Apache uses the certificate that I have configured for the example.org webspace.
When I visit https://example.net, Apache uses the certificate that I have configured for the example.net webspace.
When I visit https://www.example.net, Apache uses the certificate that I have configured for the example.org webspace.

How do I convince Apache to use the certificate that I have configured for the example.net domain when somebody requests https://www.example.net?

When I try to add a new Subdomain www to the example.net domain, I get
Incorrect subdomain name www.example.net: the domain example.net already has the WWW prefix.
When I try to add a domain alias for the example.net domain, I get
Error: Incorrect name of domain alias www.example.net, this alias is already created for the domain example.net.

In DNS (also managed using Plesk), www.example.net is a CNAME for example.net
 
Last edited:
Workaround:

1. Delete the CNAME entry for www.example.net from DNS.
2. Create a new subdomain www of example.net. This will automatically create an A entry in the DNS.
3. Assign a certificate to the www.example.net subdomain the same way you did for example.net.

I wonder why Plesk is bold enough to automatically create the www.example.net CNAME entry when it cannot figure out the correct certificate to use.
 
Back
Top