Best practice for migrating primary domain?

I am migrating the primary domain for several Netlify sites. For example, if I have app.mydomain1.com, I want to move it to app.mydomain2.com. But to make it seamless for users I need the mydomain1 URL to still work / forward to the new URL.

I have added app.mydomain2.com to my site as a custom domain. The existing Lets Encrypt SSL certificate in Netlify only covers app.mydomain1.com, so when I go to app.mydomain2.com it works but shows a “Not Secure” warning. What is the right way to migrate this successfully?

  1. Do I need to change the new domain (mydomain2) to be the primary domain? But then will this leave mydomain1 without an SSL certificate?
  2. Do I need to click the “Renew certificate” button? I tried this and waited 10 minutes but nothing has changed. Maybe I need to wait longer?
  3. Should I instead remove mydomain1 entirely from Netlify, and in my DNS provider (Cloudflare) add forwarding to send all app.mydomain1 requests to app.mydomain2? But this will leave me with a gap where there is no SSL certificate for mydomain2?

Thank you for any advice with this!

I’d recommend adding the new domain as a domain alias first. As long as the DNS is configured correctly, SSL should be provisioned within a few minutes, if not a few seconds. Once the SSL is provisioned, you can switch the primary domain.

You might also want to add Redirects: Redirects and rewrites | Netlify Docs

Thanks for your reply. I had added the new domain as a domain alias prior to my previous post, and DNS is configured correctly, but the SSL certificate only covers the original domain. How do I fix this?

In the screenshot below, refer.begrateful.org is the old domain and refer.gratefulgiving.org is the new domain.

Here is a second screenshot showing that SSL certificate only covers the old domain and has not updated to include the new domain.

In that case, did you try clicking on Renew?

I clicked Renew yesterday before submitting my question, and nothing changed. I tried it again after seeing your reply to double check - and this time it did update the certificate to include the new domain. Perfect. Thank you for your help! My issue is resolved now.