So I have www.old-domain.com
and we've just transferred to www.new-domain.com
old-domain.com
's server had an SSL certificate and could handle both http://www.old-domain.com
and https://old-domain.com
www.new-domain.com
is also capable of SSL, with a certificate installed.
In the DNS records of old-domain.co
m I've routed all traffic to new-domain.com
On the NGINX serving www.new-domain.com I've put this at the top of my "default" settings file:
server {
listen 80;
server_name old-domain.com www.old-domain.com;
return 301 https://new-domain.com$request_uri;
}
is that enough to redirect the traffic correctly to the new domain whether they use http://old-domain.com
or https://old-domain.com
?
The reason I suspect it's not enough is because after the DNS records updated I am getting this:
note that:
Obviously I'm missing something.