Which is the default SSL certificate?

I have a server with 'Server Name Indication' enabled to allow it to host 2 sites each with their own SSL Cert. XP and IE do not support 'Server Name Indication' so it always complains that the certificate is not for the correct site. I'm move from Site A to Site B and will eventually close Site A.

IE on XP uses the SSL cert from Site A when trying to open Site B.

How can I get the SSL cert for Site B to be the default when 'Server Name Indication' fails on XP?

Thank you for any help.

5 Replies

Another site I read says "If you choose to use SNI and someone visits your secure site with a browser that doesn’t support SNI they will receive the default certificate and their browser will display a certificate-mismatch warning.". But how do I set which is the DEFAULT cert?

The default cert will be the one of the default(first) vhost listening on port 443. And for most webservers this is ordered alphabetically by default, based on the files in your sites-enabled/ folder. I believe nginx also supports the default_server directive.

Thank you, I will investigate the default_server directive.

If its alphabetical on my site/server name is there a way to get b.com serve the SSL cert and not a.com?

@markunit:

Thank you, I will investigate the default_server directive.

If its alphabetical on my site/server name is there a way to get b.com serve the SSL cert and not a.com?

It'll be alphabetical based on the filenames in your (usually) sites-enabled/ folder. If you want to prefer b.com over a.com you can name the file 0-b.com.(that's why a lot of default vhosts will be named 001-default.

Thanks thats great.

I will disable 'b.com', rename the file to 0.b.com then enable this site.

Thanks again.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct