Reputation: 2679
So I have been researching how to re-direct my old domain to my new domain and stumbled on this stack article here.
This solution makes sense to me, but when I open my own I get a little overwhelmed. First off I am assuming I want to go into my sites-enabled
and not my sites-available
correct?
When I edit the file in sites-enabled for my website its not as simple as the one i the stack example I linked to earlier. I have used certbot for SSL for my website.
My sites-enabled file looks like this:
I am a bit confused on which "server" section I would put the redirect in to not mess with the certificate?
I was thinking i have to change the redirect thats already there from certbot in each server and just replace seekadventure with newDomainName since they are already all 301 (Permanent redirects, good for google SEO right?)
My concern is if I do that my SSL cert is with my seekadventure domain? I would I then add the SSL cert to the new domain name?
I essentialy want to keep both domains so if someone stumbles on an old link on reddit it will redirect them to the new domain...
Upvotes: 0
Views: 10499
Reputation: 2679
For those who have the same issue, you can check out thet help I got on the Lets Encrypt Forums: https://community.letsencrypt.org/t/nginx-adding-changing-domain-name/153184
Upvotes: 1