Cannot switch domain to another one


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: (old), (new)

I ran this command: I revoked the certificate of, and installed new certificate for; and i was hoping to switch the domain on the same machine. however it doesn’t work, it always redirect to

It produced this output: it always redirect to

My web server is (include version): nginx

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: AlphaRacks

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): shell, wordpress


look for a rewrite condition or return statement in your vhost config file


The DNS A record for seems to resolve to - if you want your server to handle the redirects from that domain, you’ll have to make sure the DNS for that domain is pointed at your server.

I’m not very familiar with nginx configuration but I believe you’ll want to have a server block for each domain, and configure the one for to perform the redirect.

Also, don’t revoke the certificate for the domain you want to redirect from! You’ll need a valid certificate to redirect any traffic that reaches the old domain over HTTPS. If you’ve already revoked it, get a new one to replace it.


There seems to be one from November that’s valid, and one from December that’s revoked.


Thanks, Jmorahan.

I think I didn’t put it clear. Let me explain a bit more:

How can I set my new domain and make it work on my server?


Thanks mnordhoff, I explained my case above, what do you think? I’m still not quite understand how the cerficate and redirection works.


There seems to be some sort of PHP application generating the redirect. Check your WordPress configuration.

By the way, you have a certificate for, but you should probably also have it include, in case people type that in.


If you’re running WordPress, follow this procedure to update the URL:


Thanks! Yes it’s the wordpress setting the redirection. I updated it seems good.

I also add www to the domain so it will redirect to the new domain as well.

Thank you all for the great help!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.