Domain forwarding to domain with ssl

Asked

Viewed 113 times

0

I’m facing a problem, we have a main domain that is with the SSL installed and we have a variation of this domain, which I registered to assist when searching for the site on the internet.

We use nginx, in a droplet of Digital Ocean.

I made the note by the digital Ocean, and it works ok, by typing the X address it enters my droplet, but it does not change to the Y address (which has the SSL) and the security error, says the X address has an invalid certificate.

I’m sorry if it got a little confusing, what I need to do is, type in the X address and it redirects to the Y address.

Can someone help me?

  • 1

    See if this can help you: https://christiaanconover.com/blog/how-to-redirect-http-to-https-in-nginx, if you can’t forget to post the solution.. ;)

  • So it didn’t work out, because when I type in the X domain (http://x.com) it goes into https://x.com and says it doesn’t have a valid certificate, instead of going into http://x.com and playing for https://y. with

  • Um.. Do you have any ssl certificates for the x.com domain? Because you have to have one certificate per domain.

  • No, we don’t, Putz, I’ll take a look

  • If both domains are SSL, each one must have its certificate purchased separately.

1 answer

-1

Tried to redirect to . htaccess?

redirect 301 http://siteX.com.br https://siteY.com.br

And if you want to change the entire domain, not to lose the strength of the links that point to the site, or visitor. Do it as follows:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://siteY.com.br/$1 [R=301,L]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.