nginx и перенаправление с другого домена

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.com 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.

1
задан 24 January 2018 в 20:42
1 ответ

позволить старой системе выполнять перенаправление, пока ее сертификат еще действителен

1
ответ дан 3 December 2019 в 23:20

Теги

Похожие вопросы