Pergunta

Scenario: A.COM, B.COM, C.COM. A & B.COM are registered with SSL. All three sites host entries are in single server in /etc/hosts with respective domain name.

Question: When I type https://C.COM (non-ssl site). It automatically redirects to A.COM (ssl site). There is no entries made in DNS (Godaddy) and server host entry for such behaviour.

Can somebody help me understand why is this happening ?

Foi útil?

Solução

It's not clear what you mean by "registered with SSL". You don't "register" with SSL. I presume you mean you've configured a certificate for HTTPS on the server(s) listening at the address(es) for a.com and b.com.

Since all 3 domains have entries in /etc/hosts, from that machine's point of view, DNS resolution is irrelevant: the hosts file will be used to give the client the IP address for each domain.

You're not saying whether a.com, b.com and/or c.com share IP addresses.

When you type https://c.com in your browser, it gets the IP address for c.com (which presumably is the same as that of a.com) and makes an SSL/TLS connection to it (on port 443). It gets the certificate presented by the server (it should show a warning message if you get a certificate that's not valid for c.com). The reason you get a.com is probably because a.com is the default host served on that IP address (and you haven't configured c.com).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top