URL shortener migration is the work of switching from the URL shortener in use to another service (or to in-house operation). The reasons for considering a migration are wide-ranging, including the service shutting down, price revisions, missing features, and securing data sovereignty. One of the main challenges is keeping short URLs that are already in circulation from becoming broken links.
The basic steps of a migration are as follows. First, export a mapping table of all short URLs and their redirect targets from the existing service. Next, build equivalent redirect rules in the new service. Then switch the DNS records from the old service to the new service, and finally verify operation and monitor. If you use a custom domain, shorten the DNS TTL in advance to minimize downtime during the switch.
In a migration, not interrupting the redirects of existing short URLs is a requirement. If existing short URLs are widely circulated on social media, email, printed materials, and so on, broken links mean that people visiting from those URLs no longer reach the destination. The new service must also guarantee that the same short code redirects to the same destination. For a migration from Bitly to an in-house service, one method is to retrieve the link list via the API and write a script that imports it into the in-house database.
One point to note during a migration is the continuity of access analytics data. The old service's statistics may become inaccessible after the migration, so export them in advance. Also, during the migration, set up a parallel operation period in which redirects work on both the old and new services, and stop the old service completely only after confirming that there are no problems.