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.

  • Nobody's listening on old-domain.com:443 Jan 24, 2018 at 21:04
  • And you'll need the certificates for old-domain to be able to read the requests. Jan 24, 2018 at 21:07
  • @GerardH.Pille so you mean the newdomain server (different from the olddomain server) cannot deal with incoming 443 requests made for the oldsite.com because it's not equipped with an SSL certificate for olddomain.com ?
    – JasonGenX
    Jan 24, 2018 at 21:35
  • Unless the server name is sent unencoded (SNI), it wouldn't even be able to determine that. Certainly not the request URI. Jan 24, 2018 at 21:57
  • Can't you let the old system do the redirecting for as long as it's certificate is still valid? Jan 24, 2018 at 22:02

1 Answer 1


let the old system do the redirecting for as long as its certificate is still valid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.