The certificate and host name verification are done by the client, using the host name as requested by the client.
This means that the IP address of the server isn't really relevant: what matters is that whatever requests a connection to the host name end up being connected to a server that has a certificate valid for that host name.
For example, if you have a dynamic IP address and a dynamic DNS service (e.g. example.dyndns.org
) updated whenever the IP address changes, a DNS CNAME entry from www.mydomain.example
pointing to example.dyndns.org
, and a certificate valid for www.mydomain.example
, a client requesting a connection to www.mydomain.example
will indeed get a certificate valid for www.mydomain.example
, and this will work irrespectively of the IP address. (This being said, for serious hosting, a fixed IP address is better.)
A good way to make the transition is to redirect all the traffic (on ports 80 and 443) from the old machine to the new machine, using an iptables
forward rule (or similar). This should allow for a smooth transition while the DNS update is propagated across all servers.
This way, the clients requesting www.mydomain.example
would be effectively served by your new server, whether www.mydomain.example
points to your old IP address or the new one.
What is going to happen to SSL on that dreamhost IP when I switch over the DNS to linode?
Depending on how much you trust your old hosting company, you may want to revoke the old certificate and get a new one (some CAs allow re-keying for free during the life-time of the certificate). Otherwise, your old hosting company may still technically have access to your private key (and could be able to use that certificate).
I have one virtual host can I host multiple domains while using SSL for one?
If you're talking about multiple plain HTTP virtual hosts with a single HTTPS virtual host, yes, this is clearly possible with your certificate. If you want more than one HTTPS virtual host on a single IP address, you'd have to use multiple certificates with Server Name Indication (not supported by some browsers, in particular Windows XP, Java 6 and some mobile clients) or a single certificate valid for all the names you want to serve (with multiple Subject Alternative Names).