Back to Blog
Migration GuideFeb 15, 202410 min read

How to Migrate from Firebase Dynamic Links to Redirectly

With Firebase Dynamic Links (FDL) shutting down, mobile developers need a reliable alternative. Here is a complete guide to switching your Flutter app to Redirectly with minimal code changes.

Why Migrate?

Google announced the deprecation of Firebase Dynamic Links, leaving many developers searching for a replacement. Redirectly was built specifically to fill this gap, offering a similar “deferred deep linking” capability but with a focus on the Flutter ecosystem.

The migration process involves three main steps:

  1. Setting up your project in Redirectly
  2. Configuring your domain and native platforms
  3. Replacing the Flutter SDK code

Step 1: Create Your Redirectly Project

First, sign up for a free account on the Redirectly Dashboard. Create a new project and note down your API Key. You will need this to initialize the SDK.

Step 2: Replace Dependencies

Remove the firebase_dynamic_links package from your pubspec.yaml and add flutter_redirectly.

dependencies:
-  firebase_dynamic_links: ^5.4.0
+  flutter_redirectly: ^1.0.0

Step 3: Initialize the SDK

In your main.dart, replace the Firebase initialization with Redirectly.

// OLD: Firebase
await Firebase.initializeApp();

// NEW: Redirectly
final redirectly = FlutterRedirectly();
await redirectly.initialize(
  RedirectlyConfig(
    apiKey: 'YOUR_API_KEY',
    enableDebugLogging: kDebugMode,
  ),
);

Step 4: Handle Incoming Links

The API for listening to links is very similar. Redirectly provides a stream for foreground clicks and a method for initial links.

Foreground Listeners

// OLD: Firebase
FirebaseDynamicLinks.instance.onLink.listen((dynamicLinkData) {
  final Uri deepLink = dynamicLinkData.link;
  // Handle link
});

// NEW: Redirectly
redirectly.onLinkClick.listen((linkClick) {
  final Uri deepLink = linkClick.originalUrl; // or linkClick.link.target
  // Handle link
});

Initial Link (App Launch)

// OLD: Firebase
final PendingDynamicLinkData? initialLink = 
    await FirebaseDynamicLinks.instance.getInitialLink();

// NEW: Redirectly
final LinkClick? initialLink = 
    await redirectly.getInitialLink();

Step 5: Update AndroidManifest & Info.plist

Just like with FDL, you need to register your domain for Android App Links and iOS Universal Links.

  • Android: Update your intent-filter host to match your Redirectly custom domain (e.g., app.redirectly.app or your own domain).
  • iOS: Update your Associated Domains entitlement to include your new domain.

Step 6: Creating Links

If you generate links programmatically, switch to the Redirectly API:

// NEW: Redirectly
final link = await redirectly.createLink(
  slug: 'promo-2024',
  target: 'https://myapp.com/promo',
  metadata: {
    'campaign': 'spring_sale',
    'source': 'instagram'
  }
);
print(link.shortUrl); // https://your.domain/promo-2024

Conclusion

Migrating to Redirectly gives you full control over your deep links with a modern, supported platform. If you have any questions during migration, check out our documentation or start building free deep links today.

Ready to Replace Firebase Dynamic Links?

Redirectly is the #1 Firebase Dynamic Links alternative, built specifically for Flutter developers. Get started with deferred deep linking, custom domains, and real-time analytics.

Start Free Migration

Redirectly Team

Building the best deep linking tools for mobile developers.

Start Migrating for Free