Redirecting https://domain1.com to https://domain2.com

I have a redirect question. My client has a domain they have used for years. They don’t have a bunch of backlinks pointing to it, but enough that we don’t want to lose them. Not to mention everything is indexed using this original domain (domain1.com). Now they have a shorter, cleaner domain they want to be their main domain. There is obviously no problem redirecting domain1.com to domain2.com but some of the links are https://domain1.com which since it has the https it will not redirect properly.

If I forward through the DNS It goes to a “This site can’t be reached” error page.

If I set up a redirect through the hosting Cpanel I get
Misdirected Request: The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection.

I have spoken with several people at godaddy and they have told me there is no way to redirect a “https” link to another page which seems odd. I have tried doing a forward through the DNS as well as a redirect through the cpanel.

I’m wondering if I can just have some sort of redirect on the home page using javascript or something to redirect that way?

Any suggestions.

If you want to forward https then you need to have an SSL certificate on that domain. No way around that. Javascript won’t help here either, since you can’t download javascript if you can’t connect to the domain.

I’d know how to set it up in NGiNX, but no idea how to do it in Cpanel.

I have SSL on both domains… also I should mention that they are in the same hosting account (not sure if that matters). I should also mention… When I did the redirect through cpanel, which basically sets up a 301 in the .htaccess file it worked on some browsers, but not safari.

Answer here seems to be what you’re running into as well: https://serverfault.com/questions/916724/421-misdirected-request

Essentially the SSL certificate in use is for both domain1.com and domain2.com, so when Safari hears from domain1.com it should go to domain2.com it re-uses the existing HTTP connection, since that can be established securely using the certificate it already has, but then the server refuses to serve 2 different domains on the same connection.

Easiest solution would be to get separate SSL certificates for the different domains so Safari is no longer able to re-use the connection.

I don’t have cPanel and use PHP header(…) function and have had no problems.

Edit:

Just partially read @rpkamp’s link… all my sites have separate HTTPS Z certificates because years ago I had problems with combining certificates. It is necessary to delete the certificate and request a new certificate for each domain. Perhaps more there is solution making single certificates unnecessary?

Everything I’ve read regarding this error seems to point to this problem being related to this being a multi-domain certificate.

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