Hello,
We apologize for the issue you are facing. When you change the root domain of your website, the canonical URLs that you have set will not automatically update to reflect the new root domain. You will need to manually update the canonical URLs to point to the new domain while maintaining the relative paths.
For example, if your original canonical URL was https://rankmath.com/kb/alternate-page-with-proper-canonical-tag/ after changing your root domain, you would need to update it to
https://rankmath.com/kb/alternate-page-with-proper-canonical-tag/.
If you have many pages to update, it might be helpful to use a bulk editing method or a plugin that can assist with this process. If you need further assistance with this, please reply to your ticket, and a human agent from the Rank Math Support team will be happy to help you.
Thank you for raising this concern!
This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.
Hello,
Yes, the canonical URL will also follow the new domain automatically.
Rank Math’s canonical base the domain you set in your WordPress Settings > General

Looking forward to helping you.