0

I have 2 SSL certificates that are generated and being used for our staging and development server.

However, we wish to change the roles of these two servers.

currently the staging server is using example.com domain and dev server is using dev.example.com domain.

So after the switch, example.com will go to the current dev server and dev.example.com will go to the current staging server.

In this case, will the SSL still be valid or do I need to get a new one?

2 Answers 2

0

If you swap the certificate, private key and hostname on both your servers, you shouldn't notice a difference.

5
  • Do I need to change the hostname too? (I mean is this absolutely necessary)
    – yhware
    Commented Aug 18, 2014 at 13:44
  • Sorry - host name may be misleading. The certificate is tied down to a common name, or several using subject alternative names (this is usually the URL or some other DNS name). Unless the common name is present as a DNS name in the certificate, you will need to regenerate a CSR and have the certificate resigned I'm afraid. Commented Aug 18, 2014 at 13:47
  • As you described it initially, you should be fine. By Host name I just meant swapping the DNS records. Commented Aug 18, 2014 at 13:50
  • Oh ok so I just looked at my CSR and under its 'common name' is my domain address. So I'm guessing this should be ok right?
    – yhware
    Commented Aug 18, 2014 at 13:54
  • Just think about it this way - if, for example, you want to use your certificate for www.mywebsite.com, "www.mywebsite.com" has to be a DNS name in that certificate. This is usually the common name, but some times you might need to have several - these are known as subject alternative names (ex. if you wanted the certificate to be valid for both www.mywebsite.com and mywebsite.com). Commented Aug 18, 2014 at 14:05
0

It depends. If you used *.example.com as your common name, then you don't need to change anything as both would be valid for both certs, but if you made the certs specifically for example.com and dev.example.com then you would have to swap the private keys and certs so that each server could communicate using the certificate tied to the given common name (first set of values in the URL after the https:// and before the next /).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .