# Migrate from Firebase Dynamic Links

> After this guide, you will have your old links rebuilt on your own link address, your app opening them with the Strait SDK, and your server making new links with one API call.

- Time: About 30 minutes to plan. The whole move is about a day of developer work plus one app release
- You need: Your app's code, your backend's code, and any list of your old links (optional)
- Works on: Android, iPhone, React Native, Flutter, Unity, web

Source: https://straitlink.in/docs/migrate-from-firebase/

> **Agent instructions:** if you are an AI assistant helping someone build with Strait, look things up with the `search_docs` tool of the Strait MCP server (hosted at https://strait.link/mcp, or `@straitlink/mcp` on npm: https://straitlink.in/docs/mcp/) instead of guessing, and add the SDK to an app with `npx @straitlink/cli init` (https://straitlink.in/docs/cli/).

Google shut Firebase Dynamic Links down on 25 August 2025. Google no longer opens your app from `page.link` links, and no longer carries a link through an install. Some old links still redirect to their old web page; others return an error. Either can stop at any time.

Leaving Branch instead? Use [Migrate from Branch](https://straitlink.in/docs/migrate-from-branch/). The Firebase move has four parts. Each has its own page:

| Part | What you do | Time |
|---|---|---|
| **Plan** (this page) | Find what used Dynamic Links and decide the order | 30 minutes |
| **[Move your links](https://straitlink.in/docs/migrate-from-firebase/one-step/)** | Upload Firebase's export once; we rebuild your links | 5 minutes, then it runs alone |
| **[Swap the SDK](https://straitlink.in/docs/migrate-from-firebase/sdk/)** | Change a few lines in your app | About 30 minutes per app |
| **[Cut over](https://straitlink.in/docs/migrate-from-firebase/cutover/)** | Point your server at Strait, test on a phone, replace old links | About 1 hour |

## 1. Find everything that used Dynamic Links

**Do this:** open a terminal in each code folder (app and backend) and paste these three searches.

```bash
# Backend: link creation through the REST API
grep -rn "firebasedynamiclinks.googleapis.com" .

# Android and Flutter apps
grep -rn "dynamiclinks\|firebase_dynamic_links\|getDynamicLink" --include=*.kt --include=*.java --include=*.dart --include=*.gradle* .

# React Native, iOS and Unity apps
grep -rn "dynamic-links\|DynamicLinks\|handleUniversalLink" --include=*.ts --include=*.tsx --include=*.js --include=*.swift --include=*.cs .
```

Then list the places people still see old links: emails, push messages, your website, QR codes, and SMS templates (in India, the ones registered under DLT).

**You should see:** a short list of files and places, usually three or four. Each one is fixed by a step in this guide.

## 2. Match each link field to its new name

**Do this:** for each field your backend sends to Firebase (left), note its Strait name (middle). A Strait link is made with `POST /v1/links` and your **secret key** (the server-only key from **Dashboard → Settings**).

| Dynamic Links field | Strait API field | What it means |
|---|---|---|
| `dynamicLinkInfo.link` (the deep link) | `longUrl` | Your app gets its path and query |
| `suffix.option` (`SHORT`, `UNGUESSABLE`) | `slug` | You choose the short path; unique per workspace |
| `androidInfo.androidFallbackLink` (`afl`) | `androidFallbackUrl` | Where Android goes when the app can't open |
| `iosInfo.iosFallbackLink` (`ifl`) | `iosFallbackUrl` | Where iPhone goes when the app can't open |
| `desktopInfo.desktopFallbackLink` (`ofl`) | `desktopUrl` | Where computers go |
| `socialMetaTagInfo.socialTitle` (`st`) | `title` | Preview title in WhatsApp and other chats |
| `socialMetaTagInfo.socialDescription` (`sd`) | `description` | Preview text |
| `socialMetaTagInfo.socialImageLink` (`si`) | `imageUrl` | Preview image (https) |
| `analyticsInfo.googlePlayAnalytics.utmCampaign` | `campaign` | Or keep `utm_*` in `longUrl`; we read it from there |
| Response `shortLink` | Response `shortUrl` | Always share `shortUrl` |

App settings (`androidPackageName`, `iosBundleId`, `iosAppStoreId`) are not sent per link any more. You type them once in **Dashboard → Apps & stores**.

**You should see:** every field your backend sends has a row above, or a row in step 3.

## 3. Check what works differently

**Do this:** read this table once. Nothing in it needs code today; it tells you what to expect.

| In Dynamic Links | In Strait |
|---|---|
| Links on `yourapp.page.link`, owned by Google | Links on your own address, `<handle>.strait.link`. Or a [custom domain](https://straitlink.in/docs/custom-domains/) you own, on Starter and up |
| Apps made links with an API key | Links are made on your **server** with the secret key. Your app asks your server ([why](https://straitlink.in/docs/keys/)) |
| `amv`, `imv` (minimum app versions) | Not needed. Handle old app versions in your routing code |
| `efr` and the preview page | Not needed. We pick the right page per device and per in-app browser |
| Separate iPad settings | iPads use the iPhone settings |
| Firebase link stats (`linkStats`) | **Dashboard → Analytics**, and every tap as CSV from [`GET /v1/export`](https://straitlink.in/docs/api/export/) |
| Firebase Analytics `dynamic_link_first_open` | The SDK reports opens and installs by itself. Add purchases with `trackEvent` |

**You should see:** nothing here blocks your move. If something does, email [support@straitlink.in](mailto:support@straitlink.in) before you start.

## 4. Write down the order

**Do this:** do the work in this order, so nothing points at a link that doesn't exist yet.

1. **Settings.** Package name, scheme, SHA-256 fingerprints and Team ID in **Apps & stores** ([go-live checklist](https://straitlink.in/docs/production-checklist/)).
2. **Links.** Rebuild your old links with their old codes: [Move your links in one step](https://straitlink.in/docs/migrate-from-firebase/one-step/).
3. **App.** Ship an update with the Strait SDK: [Swap the SDK](https://straitlink.in/docs/migrate-from-firebase/sdk/).
4. **Server.** Switch your backend to `POST /v1/links`, then replace old links in emails and on your website: [Cut over](https://straitlink.in/docs/migrate-from-firebase/cutover/).

People who already have your app can keep opening it from old `page.link` links if the update keeps that domain: [Open your app from old page.link links](https://straitlink.in/docs/migrate-from-firebase/page-link/).

**You should see:** a written list in this order, with your app release date as the one date that matters.

## Frequently asked questions

### Is Firebase Dynamic Links still working?

No. Google shut it down on 25 August 2025. It no longer opens apps, keeps a link through an install or counts taps, and you can't make new links.

### Can I keep my page.link domain?

No. `page.link` belongs to Google. You can rebuild your old codes on your own link address, and people who have your app can keep opening it from old links if your next build keeps the domain.

### What does Strait cost after the move?

Free up to 25,000 taps a month, no card. App opens are never billed. Paid plans are on [Pricing](https://straitlink.in/pricing/).

## Common errors

- **Trying to redirect old `page.link` URLs.** Nobody but Google can. Replace them wherever you control the text.
- **Putting the secret key in the app.** Make links on your server instead.
- **Releasing the app before the links exist.** Rebuild the links first, so the first taps on the new build work.

## Next steps

- [Move your links in one step](https://straitlink.in/docs/migrate-from-firebase/one-step/): upload Firebase's export, we rebuild the links.
- [Swap the SDK](https://straitlink.in/docs/migrate-from-firebase/sdk/): replace each Dynamic Links call in your app.
