Not easy to understand your steps…
If Matomo server changes its domain name, you’ll have to change the calls to Matomo scripts…
And if you use MTM, don’t forget to update also the Matomo Configuration variable.
Anyway, I found in Settings > General > Trust Hostname a space for multiples canonical names. I imagine that is only add ‘webanalytics.mycompany.com’ name in next entry after ‘wa.mycompany.com’ and my new matomo instance will read also the first domain name.
After, is to change the DNS for webanalytics to IP of wa and finish.
If this feature works (Trusted Hostname), is only ‘turn the key’ in DNS from old IP to new IP (i think), that new instance will get all traffic. Or not?
If your browser sends traffic to an address name that doesn’t exist anymore, nothing will arrive to your server!
Then if you just change the name in DNS from webanalytics.mycompany.com to wa.mycompany.com, your old scripts that hit webanalytics.mycompany.com will encounter unknown domain name error
Sorry by my mistake. I believe that I not explaned correctly.
Today I have 2 environment, each one with its address name: webanalytics and wa. Both are running.
How I reforced the WA env, I wait to bring all sites that are running in webanalytics site to WA site. How I want NOT change the script in my systems (at this moment), I think in to change the DNS for webanalytics pointing to WA site.
All Ids sites already are registered in WA equal to webanalytics. So, all clients will connect to WA site equal to webanalytics.