Change PWA URL without reinstalling the app

Hello Ionic Forum,

I have a Ionic PWA running in production installed on many of my users devices on https://url1.mydomain.com and I need to move it on https://url2.mydomain.com.

I tried to do a simple redirect using apache, and it seems to work on normal browsers, but on iOS/Android installed PWA app, instead of staying full screen, the app suddenly shows a browser url and footer bar at the top and bottom of the screen as if the app was accessing the in-app browser treating the new url as external to the app.

Does someone knows what I should do to make this change without to uninstall and reinstall the PWA app ? Maybe modifying the manifest or service worker ? Any idea would be welcome.

Thanks all

Arnaud

PWAs are sort of a shortcut for your url, so if you change the url you need a new “shortcut”, so uninstall and reinstall is the only option.

Oh my ! Years telling my customers that PWAs are not just simple shortcuts… You kind of broke my legs with your response hahahaha !

I see you are from the Ionic Team, so I assume you are completly sure of your response, right ? Or this is just an opinion ?

Thanks for your answer !

I’m on Capacitor team and don’t have a lot of PWA experience, and it’s an opinion, have not really tried. But I think PWAs are associated with the domain used to install them and can’t be changed afterwards.

Also, there are requests to allow multiple scopes or ways to consider different subdomains the same PWA, but as far as I know they are not implemented yet. Allow for multiple scopes · Issue #449 · w3c/manifest · GitHub
So if people is requesting it, I think it’s because it’s not possible.