I have an existing website for which I want to change the domain name. I will continue to use the same server and IP address, I only wish to change the domain. I am using nginx
and Namecheap
.
So far I have:
- Purchased the new domain through
namecheap
- Created the
A Record
for@
andA Record
forwww
for the new domain - Updated my existing
nginx
config to the new domain including a new lets encrypt ssl cert - Removed the old ssl cert from the server
The new domain is now working correctly. The old domain redirects correctly but only for non https. In other words, the following works correctly:
- http://oldsite.com redirects to https://www.newsite.com
- http://www.oldsite.com redirects to https://www.newsite.com
But it does not work when using https from the old site. I contacted namecheap
and they said it is not possible to do via their web console. So I presume I have to do it manually somehow in nginx?