Can't re-add a domain when migrating app from v1 to v2

I’m trying to migrate an app from v1 to v2.

Just deployed the app and now I need to add the domain to the new app but I’m getting this error:

Error Validation failed: Name has already been taken

I guess Fly expects me to remove the domain from the v1 app? If that’s the case, how can I achieve zero downtime migration?

If I remove the domain from the v1 app then people with the cached old DNS won’t be able to access the app.

I did this procedure two weeks ago with another app and I didn’t get this error. Simply added the domain to the v2 app, changed the DNS, and waited two days for the DNS propagation before deleting the v1 app.

1 Like

This is on “fly certs add” or something else? I was able to create duplicates there.

Yeah I can probably add a cert for the domain of the v2 app, but AFAIK without adding the domain with fly domains add the Fly router won’t send the requests to the new v2 app.

Hmmm…never knew “fly domains” even existed. Seems like it is only for registration.

$ fly domains
Manage domains
Notice: this feature is deprecated and no longer supported.
You can still view existing domains, but registration is no longer possible.

I never used this during migration and everything worked for routing.

1 Like

Thanks I completely missed that message!

Only saw the error and made bad assumptions.

1 Like

Ok this worked.

Some tips for future Pier who’s an idiot and will probably forget this.

Create the cert, do the verification procedure (_acme-challenge etc), and confirm the cert has been issued before switching the DNS of the domain :sweat_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.